ls -l segfault + [PATCH]

Jan Evert van Grootheest Jan-Evert.van.Grootheest at Vialis.nl
Mon Mar 19 12:18:07 UTC 2007


> On Mon, Mar 19, 2007 at 08:26:46AM +0100, Jan Evert van 
> Grootheest wrote:
> > Hmm, it crashes for me also with ls -la /bin...
> > And it doesn't crash in strace (or gdb) here too.
> 
> Busybox has a feature that allows calling applet_main() 
> instead of exec(self, applet, args...). It might be that 
> there's some changed data that causes the SEGV.
> 
> Change the function is_safe_applet, in shell/ash.c, to always 
> return false (0), and check if the SEGV disappears.

With return 0 at the top of is_safe_applet, ls works just fine.

So I guess there's a difference in libc where setvbuf does something weird... I already worked up a small testprogram that failed to show the issue, but I'll now add a fork to it.
The main difference here, I think, is the program state? A newly exec-ed process vs. The history of the parent.

-- Jan Evert 
 
The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. Vialis is neither liable for the proper and complete transmission of the information contained in this communication nor for any delay in its receipt. 
 



More information about the busybox mailing list