On Wed, Sep 20, 2006 at 09:35:54AM -0700, Jurij Smakov wrote: > Hi, > > This crash happens because the buf2 buffer declared on line 656 of > eeprom.c ends up not aligned on a 4-bit boundary. One simple solution > is to declare it as > > int buf2[1024]; > > then compiler enforces the alignment and it does not crash anymore.
Hello Jurij, I don't understand why 'buf2' is not aligned on a 4-bytes boundary since it is the first data allocated on stack in 'print_all_options' subroutine and, as far as I know, stack frames are 4-bytes (maybe 8-bytes on sparc64) aligned and local variables are allocated on stack next to stack frame. Or is it a matter of sparc64 which needs pointers to be 8-bytes aligned but 'buf2' is only 4-bytes aligned? You then need to declare 'buf2' as 'long long int[512]' (or int64_t[512]). > Eric, if you don't have access to a sparc workstation, perhaps you > would be willing to accept me as a comaintainer? Feel free to update sparc-utils. Your welcome :) Is there something I must do on my own to give you comaintainer power? Best regards, Eric. PS: line 57 of eeprom.c contains a similar definition of a 'buf' global variable which could be fixed in the same way. -- Eric Delaunay | Le travail est trop sérieux pour le confier [EMAIL PROTECTED] | à ceux qui veulent se tuer avec. Jissey.

