[Toybox] 81207825c50fa9a4ec1475024543f830dee247fd broke bionic build
enh
enh at google.com
Tue Jan 22 12:54:48 PST 2019
this hunk from 81207825c50fa9a4ec1475024543f830dee247fd:
diff --git a/toys.h b/toys.h
index 4083725a..df37b55e 100644
--- a/toys.h
+++ b/toys.h
@@ -108,7 +108,7 @@ extern struct toy_context {
char wasroot; // dropped setuid
// This is at the end so toy_init() doesn't zero it.
- jmp_buf *rebound; // longjmp here instead of exit when do_rebound set
+ sigjmp_buf *rebound; // longjmp here instead of exit when do_rebound set
struct arg_list *xexit; // atexit() functions for xexit(), set by sigatexit(
)
void *stacktop; // nested toy_exec() call count, or 0 if vforked
} toys;
caused:
external/toybox/toys/net/netcat.c:188:37: error: incompatible pointer
types assigning to 'sigjmp_buf *' (aka 'long (*)[33]') from 'jmp_buf
*' (aka 'long (*)[32]') [-Werror,-Wincompatible-pointer-types]
if (toys.optflags&FLAG_L) NOEXIT(child = XVFORK());
^~~~~~~~~~~~~~~~~~~~~~~~
external/toybox/lib/lib.h:375:19: note: expanded from macro 'NOEXIT'
#define NOEXIT(x) WOULD_EXIT(_noexit_res, x)
^~~~~~~~~~~~~~~~~~~~~~~~~~
external/toybox/lib/lib.h:367:16: note: expanded from macro 'WOULD_EXIT'
toys.rebound = &_noexit; \
^ ~~~~~~~~
1 error generated.
hmm... looks like you always call setjmp (rather than sigsetjmp) but
also always call siglongjmp?
so the real fix is probably to s/setjmp/sigsetjmp/ and move _noexit
over to sigjmp_buf too:
#define WOULD_EXIT(y, x) do { jmp_buf _noexit; \
patch attached...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-sigjmp_buf-jmp_buf-mismatches.patch
Type: text/x-patch
Size: 3753 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190122/745f1ebe/attachment-0002.bin>
More information about the Toybox
mailing list