[Spread-users] crash bug report

Mikhail Terekhov terekhov at emc.com
Wed Feb 11 15:07:20 EST 2004


It still gives a bus error. Attached patch fixes it for me.
The explanation is that gcc takes definition "int32 *num_vs_ptr"
as a hint and eliminates call to memcpy.

Regards,
Mikhail


Jonathan Stanton wrote:

>I have fixed all of this type of bus-error causing bugs in the groups code
>that I can find. The fixes have been committed to CVS. If you want to try
>it out, since I don't really have any Sparcs or Alphas I can test on, I'd
>appreciate it.
>
>If you want to wait for a release to test, I hope to package up a test 
>version of 3.17.2 soon, and that will include this fix. I just have a bit 
>more I want to do first.
>
>Cheers,
>
>Jonathan
>
>On Wed, Dec 24, 2003 at 12:34:04PM -0500, Mikhail Terekhov wrote:
>  
>
>>The same thing could happen on lines 866,1121,1314,1512,1829.
>>Am I correct?
>>
>>Mikhail
>>
>>Theo Schlossnagle wrote:
>>
>>    
>>
>>>On Tue, 2003-12-23 at 17:04, Greg Shebert wrote:
>>>
>>>
>>>      
>>>
>>>>line 797:
>>>>
>>>>num_vs_ptr = (int32 *)&Mess_buf[ num_bytes ];
>>>>num_bytes += sizeof( int32 );
>>>>*num_vs_ptr = 1;
>>>>
>>>>the last statement (line 799) can cause a bus error... basically, if
>>>>num_bytes is not a multiple of the host systems word size then the last
>>>>statement tries to write a word length value into a location that is not
>>>>word aligned... 
>>>>
>>>>the resulting bus error brings down the daemon :(
>>>>
>>>>i corrected this using a memcpy instead of the assignment and this seems
>>>>to correct the problem...
>>>>
>>>>i experienced the problem on solaris2.8
>>>>  
>>>>
>>>>        
>>>>
>>>You are not mislead.  That will certainly cause a bus error on any
>>>architecture that requires word aligned copies like that.  It'll likely
>>>bus error on alpha as well.
>>>
>>>
>>>
>>>      
>>>
>>_______________________________________________
>>Spread-users mailing list
>>Spread-users at lists.spread.org
>>http://lists.spread.org/mailman/listinfo/spread-users
>>    
>>
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20040211/280a0e62/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: groups.c.patch
Url: http://lists.spread.org/pipermail/spread-users/attachments/20040211/280a0e62/attachment.pl 


More information about the Spread-users mailing list