You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joel Low <jo...@joelsplace.sg> on 2011/10/23 10:05:20 UTC

Infinite loop on when using svn blame

Hello List,

I've got an infinite loop when running svn blame over file:/// on my own SVN binaries (Windows, x64, VS 2008)

I'm not sure if it is caused by my repository (it's public -- the Eraser SourceForge repository, repository can be rsynced from SourceForge servers) Trying to run blame from TortoiseSVN seems to work fine, so I did some debugging.

It seems that there's an infinite loop in find_identical_prefix (diff_file.c:379, svn 1.7.1 tag), specifically within the ifdefs in SVN_UNALIGNED_ACCESS_IS_OK between lines 417 and 455. I disabled the whole block since the comment in svn_types.h details that SVN_UNALIGNED_ACCESS_IS_OK is an optimisation opportunity define and rebuilt; the blame runs successfully then.

Any help to debug into this would be greatly appreciated, if my platform/build tools are a supported bunch (I don't really see x64 Subversion binaries for Windows so I'm not sure on this)

Regards,
Joel


RE: Infinite loop on when using svn blame

Posted by Joel Low <jo...@joelsplace.sg>.
> -----Original Message-----
> From: Mark Phippard [mailto:markphip@gmail.com]
> Sent: Tuesday, 25 October, 2011 4:23 AM
> To: Joel Low
> Cc: Bert Huijben; Subversion Developers' List
> Subject: Re: Infinite loop on when using svn blame
> 
> On Mon, Oct 24, 2011 at 8:35 AM, Joel Low <jo...@joelsplace.sg> wrote:
> 
> >
> > Yes, the generated project files only define WIN32. In my build of
> APR, apr.h defines:
> >
> > #ifdef WIN64
> > #define APR_SIZEOF_VOIDP   8
> > #else
> > #define APR_SIZEOF_VOIDP   4
> > #endif
> >
> > A quick search around the APR source tree (I loaded up the Apache
> HTTPd solution, of which libapr and libapr-util are projects in)
> revealed no references to _WIN64.
> 
> So what is the fix for this problem?  To do some kind of external
> define of WIN64 when running the build scrips.  Is this something you
> can set on the command line when running MSBuild?
> 

Yes, modifying the generated project files to define WIN64 does resolve the problem. I've not run it through MSBuild, but I figure that should work similarly.

Re: Infinite loop on when using svn blame

Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Oct 24, 2011 at 8:35 AM, Joel Low <jo...@joelsplace.sg> wrote:

>
> Yes, the generated project files only define WIN32. In my build of APR, apr.h defines:
>
> #ifdef WIN64
> #define APR_SIZEOF_VOIDP   8
> #else
> #define APR_SIZEOF_VOIDP   4
> #endif
>
> A quick search around the APR source tree (I loaded up the Apache HTTPd solution, of which libapr and libapr-util are projects in) revealed no references to _WIN64.

So what is the fix for this problem?  To do some kind of external
define of WIN64 when running the build scrips.  Is this something you
can set on the command line when running MSBuild?


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

RE: Infinite loop on when using svn blame

Posted by Joel Low <jo...@joelsplace.sg>.
Hi Bert,

> -----Original Message-----
> From: Bert Huijben [mailto:bert@qqmail.nl]
> Sent: Monday, 24 October, 2011 8:22 PM
> To: Joel Low; 'Subversion Developers' List'
> Cc: Mark Phippard
> Subject: RE: Infinite loop on when using svn blame
> 
> > -----Original Message-----
> > From: Joel Low [mailto:joel@joelsplace.sg]
> > Sent: zondag 23 oktober 2011 10:15
> > To: Subversion Developers' List (dev@subversion.apache.org)
> > Subject: RE: Infinite loop on when using svn blame
> >
> > > -----Original Message-----
> > > From: Joel Low [mailto:joel@joelsplace.sg]
> > > Sent: Sunday, 23 October, 2011 4:05 PM
> > > To: Subversion Developers' List (dev@subversion.apache.org)
> > > Subject: Infinite loop on when using svn blame
> > >
> > > Hello List,
> > >
> > > I've got an infinite loop when running svn blame over file:/// on
> my
> > > own SVN binaries (Windows, x64, VS 2008)
> > >
> > > I'm not sure if it is caused by my repository (it's public -- the
> > > Eraser SourceForge repository, repository can be rsynced from
> > > SourceForge servers) Trying to run blame from TortoiseSVN seems to
> work
> > > fine, so I did some debugging.
> > >
> > > It seems that there's an infinite loop in find_identical_prefix
> > > (diff_file.c:379, svn 1.7.1 tag), specifically within the ifdefs in
> > > SVN_UNALIGNED_ACCESS_IS_OK between lines 417 and 455. I disabled
> > the
> > > whole block since the comment in svn_types.h details that
> > > SVN_UNALIGNED_ACCESS_IS_OK is an optimisation opportunity define
> > and
> > > rebuilt; the blame runs successfully then.
> >
> > Sorry for the noise. The definition of apr_uintptr_t is important:
> WIN32
> is
> > defined in the MSVC project files, but APR detects x64 purely by
> defines
> (in
> > this case WIN64) which the project files do not define. Defining
> WIN64
> (and
> > WIN32) in all projects seems to have fixed the problem.
> 
> Which apr version did you use?
> 
> Apr 1.3.X checks for WIN64, but 1.4.X checks for _WIN64 and WIN64.

I built against Apr 1.4.5 and Apr-util 1.3.12.

> 
> I think we don't define WIN64 in our build, but _WIN64 is automatically
> added by the Microsoft C++ compiler for x64 builds.
> 
> 	Bert

Yes, the generated project files only define WIN32. In my build of APR, apr.h defines:

#ifdef WIN64
#define APR_SIZEOF_VOIDP   8
#else
#define APR_SIZEOF_VOIDP   4
#endif

A quick search around the APR source tree (I loaded up the Apache HTTPd solution, of which libapr and libapr-util are projects in) revealed no references to _WIN64.

RE: Infinite loop on when using svn blame

Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: Joel Low [mailto:joel@joelsplace.sg]
> Sent: zondag 23 oktober 2011 10:15
> To: Subversion Developers' List (dev@subversion.apache.org)
> Subject: RE: Infinite loop on when using svn blame
> 
> > -----Original Message-----
> > From: Joel Low [mailto:joel@joelsplace.sg]
> > Sent: Sunday, 23 October, 2011 4:05 PM
> > To: Subversion Developers' List (dev@subversion.apache.org)
> > Subject: Infinite loop on when using svn blame
> >
> > Hello List,
> >
> > I've got an infinite loop when running svn blame over file:/// on my
> > own SVN binaries (Windows, x64, VS 2008)
> >
> > I'm not sure if it is caused by my repository (it's public -- the
> > Eraser SourceForge repository, repository can be rsynced from
> > SourceForge servers) Trying to run blame from TortoiseSVN seems to work
> > fine, so I did some debugging.
> >
> > It seems that there's an infinite loop in find_identical_prefix
> > (diff_file.c:379, svn 1.7.1 tag), specifically within the ifdefs in
> > SVN_UNALIGNED_ACCESS_IS_OK between lines 417 and 455. I disabled
> the
> > whole block since the comment in svn_types.h details that
> > SVN_UNALIGNED_ACCESS_IS_OK is an optimisation opportunity define
> and
> > rebuilt; the blame runs successfully then.
> 
> Sorry for the noise. The definition of apr_uintptr_t is important: WIN32
is
> defined in the MSVC project files, but APR detects x64 purely by defines
(in
> this case WIN64) which the project files do not define. Defining WIN64
(and
> WIN32) in all projects seems to have fixed the problem.

Which apr version did you use?

Apr 1.3.X checks for WIN64, but 1.4.X checks for _WIN64 and WIN64.

I think we don't define WIN64 in our build, but _WIN64 is automatically
added by the Microsoft C++ compiler for x64 builds.

	Bert


RE: Infinite loop on when using svn blame

Posted by Joel Low <jo...@joelsplace.sg>.
> -----Original Message-----
> From: Joel Low [mailto:joel@joelsplace.sg]
> Sent: Sunday, 23 October, 2011 4:05 PM
> To: Subversion Developers' List (dev@subversion.apache.org)
> Subject: Infinite loop on when using svn blame
> 
> Hello List,
> 
> I've got an infinite loop when running svn blame over file:/// on my
> own SVN binaries (Windows, x64, VS 2008)
> 
> I'm not sure if it is caused by my repository (it's public -- the
> Eraser SourceForge repository, repository can be rsynced from
> SourceForge servers) Trying to run blame from TortoiseSVN seems to work
> fine, so I did some debugging.
> 
> It seems that there's an infinite loop in find_identical_prefix
> (diff_file.c:379, svn 1.7.1 tag), specifically within the ifdefs in
> SVN_UNALIGNED_ACCESS_IS_OK between lines 417 and 455. I disabled the
> whole block since the comment in svn_types.h details that
> SVN_UNALIGNED_ACCESS_IS_OK is an optimisation opportunity define and
> rebuilt; the blame runs successfully then.

Sorry for the noise. The definition of apr_uintptr_t is important: WIN32 is defined in the MSVC project files, but APR detects x64 purely by defines (in this case WIN64) which the project files do not define. Defining WIN64 (and WIN32) in all projects seems to have fixed the problem.

> 
> Any help to debug into this would be greatly appreciated, if my
> platform/build tools are a supported bunch (I don't really see x64
> Subversion binaries for Windows so I'm not sure on this)
> 
> Regards,
> Joel