A full gdb output is available here: http://pastebin.com/3k6SENiX

 The issue comes from the fact that fflush(stream) is #define'd as
fflush_unlocked(stream), so fflush(0) actually runs
fflush_unlocked(0), which segfaults with the current version of
musl (but not glibc).

 fflush_unlocked() and friends are not part of the standard API
(only getc_unlocked and putc_unlocked are) and it is a mistake
to assume they 1. exist, 2. behave the same as their non-unlocked
counterpart.

 The culprit is this commit:
https://git.busybox.net/busybox/commit/include/libbb.h?id=aa3576a29b9619f4e1c1b131f5db53ad2bc2cb00

 Later commits modify the additions in libbb.h, but those
additions are incorrect in the first place. I will send a
patch that removes them.

--
 Laurent

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to