run-parts segfaults with gcc 4.5.0
Thierry Reding
thierry.reding at avionic-design.de
Mon May 10 08:16:28 UTC 2010
Hi,
After upgrading gcc to 4.5.0, I get segfaults when running the run-parts
applet. The segfault happens in bb_alphasort() during the calls to strcmp().
I debugged this and saw that the pointers passed into strcmp() were both
NULL. Apparently this comes from the act() function, which for some reason
overwrites the elements of the names array. Oddly enough, when I print that
same array at the end of each call to act() the segfault disappears.
FWIW, I came up with the following patch that fixes things, though it is
probably not the preferred way for busybox because it removes the names
variable from the global storage.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-segfault.patch
Type: text/x-diff
Size: 1669 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20100510/b62c537f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20100510/b62c537f/attachment.pgp>
More information about the busybox
mailing list