You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Max Bowsher <ma...@ukf.net> on 2006/08/16 19:24:17 UTC

Another 1.4.x-specific Ruby failure

I'm seeing another 1.4.x-specific Ruby failure.

Can anyone confirm?


   1) Error:
test_apply(SvnDeltaTest):
ArgumentError: NULL pointer given
     swig/ruby/svn/util.rb:60:in `svn_txdelta_apply_wrapper'
     swig/ruby/svn/util.rb:60:in `txdelta_apply_wrapper'
     swig/ruby/svn/delta.rb:52:in `apply'
     swig/ruby/test/test_delta.rb:124:in `test_apply'


Max.




Re: Another 1.4.x-specific Ruby failure

Posted by Peter Samuelson <pe...@p12n.org>.
[Max Bowsher]
> My SWIG_RB_COMPILE is picking up -fno-strict-aliasing anyway (from
> Ruby, I assume).
> 
> I'm getting reproducable failures with 1.4.x, yet trunk is fine.
> I'm working on amd64 Debian etch.

Probably still a ruby bug rather than a svn bug.  We have had multiple
failures that look like this - the most recent was solved by building
all of ruby with -fno-strict-aliasing, but an earlier incarnation,
which happened on powerpc, was solved by building ruby with a different
version of gcc (4.0.2 vs. 4.0.3, if I remember correctly).  I guess
that there's some dodgy code in ruby somewhere, which sometimes gets
compiled correctly and sometimes not, depending on whims of the gcc
optimiser on a given version and platform - that -fno-strict-aliasing
fixed it for us in one instance may have been an accidental side effect
of perturbing the optimiser just enough.

Re: Another 1.4.x-specific Ruby failure

Posted by Max Bowsher <ma...@ukf.net>.
Peter Samuelson wrote:
> [Max Bowsher]
>>   1) Error:
>> test_apply(SvnDeltaTest):
>> ArgumentError: NULL pointer given
>>     swig/ruby/svn/util.rb:60:in `svn_txdelta_apply_wrapper'
>>     swig/ruby/svn/util.rb:60:in `txdelta_apply_wrapper'
>>     swig/ruby/svn/delta.rb:52:in `apply'
>>     swig/ruby/test/test_delta.rb:124:in `test_apply'
> 
> That looks like something we fixed in the Debian build with a patch to
> Makefile.in (though I note that this was long before 1.4.x):
> 
> -SWIG_RB_COMPILE = @SWIG_RB_COMPILE@
> +SWIG_RB_COMPILE = @SWIG_RB_COMPILE@ -fno-strict-aliasing
> 
> (Of course, this should be done by autoconf in $SWIG_RB_COMPILE, as it
> is gcc-specific.)
> 
> Omitting this flag results in a lot of warnings about type-punned
> pointers, which are a bug in C99 and can cause gcc to mis-optimise
> code.  However, I did not dig in to see whether these warnings are
> caused by ruby, or swig, or the subversion bindings.

My SWIG_RB_COMPILE is picking up -fno-strict-aliasing anyway (from Ruby, 
I assume).

I'm getting reproducable failures with 1.4.x, yet trunk is fine.
I'm working on amd64 Debian etch.

Max.




Re: Another 1.4.x-specific Ruby failure

Posted by Peter Samuelson <pe...@p12n.org>.
[Max Bowsher]
>   1) Error:
> test_apply(SvnDeltaTest):
> ArgumentError: NULL pointer given
>     swig/ruby/svn/util.rb:60:in `svn_txdelta_apply_wrapper'
>     swig/ruby/svn/util.rb:60:in `txdelta_apply_wrapper'
>     swig/ruby/svn/delta.rb:52:in `apply'
>     swig/ruby/test/test_delta.rb:124:in `test_apply'

That looks like something we fixed in the Debian build with a patch to
Makefile.in (though I note that this was long before 1.4.x):

-SWIG_RB_COMPILE = @SWIG_RB_COMPILE@
+SWIG_RB_COMPILE = @SWIG_RB_COMPILE@ -fno-strict-aliasing

(Of course, this should be done by autoconf in $SWIG_RB_COMPILE, as it
is gcc-specific.)

Omitting this flag results in a lot of warnings about type-punned
pointers, which are a bug in C99 and can cause gcc to mis-optimise
code.  However, I did not dig in to see whether these warnings are
caused by ruby, or swig, or the subversion bindings.

Re: Another 1.4.x-specific Ruby failure

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 8/16/06, Max Bowsher <ma...@ukf.net> wrote:
> I'm seeing another 1.4.x-specific Ruby failure.
>
> Can anyone confirm?
>
>
>    1) Error:
> test_apply(SvnDeltaTest):
> ArgumentError: NULL pointer given
>      swig/ruby/svn/util.rb:60:in `svn_txdelta_apply_wrapper'
>      swig/ruby/svn/util.rb:60:in `txdelta_apply_wrapper'
>      swig/ruby/svn/delta.rb:52:in `apply'
>      swig/ruby/test/test_delta.rb:124:in `test_apply'

I'm not seeing that here.  1.4.x as of r21092, Ubuntu Dapper on an x86
machine, Ruby 1.8.4.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org