[BusyBox] Bug report: ash
Peter Nilsson
peter.nilsson at axis.com
Wed May 7 16:52:58 UTC 2003
Hi!
This bug report is focused on code rather than fucntionality since some debugging has already been performed. I could not come up with any quick solution though since the whole memory handling based on the global variables stackp, stacknleft and sstrnleft seems quite broken. I have
started with ash.c, rev 1.69 as taken from http://www.busybox.net/cgi-bin/cvsweb/busybox/shell/ash.c) and added comments under "FIXME:" labels and asserts that should alert the problems. Any non-trivial example, such as execution of scripts longer than 20 rows should trigger assert failures. If not, static code analysis based on the README:s should be helpful enough.
I have appended the diff againt rev 1.69 in this email.
Note that ash may work suprisingly well if the asserts are turned off and illegal memory access are lucky enough noy to cause segmentation faults. But please add the asserts (well, at least the valid ones ;-) to the code permanently as the failures I have experienced left me with virtually no clues at all. The tool valgrind was my only chance to even get started.
I'm not a member of the list busybox at busybox.net so please respond to me directly.
Regards/
Peter Nilsson
<<ash_diff.c>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ash_diff.c
Type: application/octet-stream
Size: 2029 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030507/06f51a3f/attachment.obj
More information about the busybox
mailing list