[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re[2]: Current git HEAD busybox segfaults on some applets
From:       "Laurent Bercot" <ska-dietlibc () skarnet ! org>
Date:       2016-09-16 16:35:23
Message-ID: emb7c1defc-fe76-4fca-9ee8-b652dba382e3 () elzian
[Download RAW message or body]


  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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic