[Gluster-devel] glusterd crashes when synctask is used in conjunction with inner functions.

Jeff Darcy jdarcy at redhat.com
Mon Oct 8 18:01:33 UTC 2012


OK, I couldn't resist.  I've attached an inner-function test program which
weakly confirms my theory.  If you run it with no arguments, the inner function
works.  If you run it with arguments, this causes the stack to be reused and
that seems to include the "thunk" I mentioned.  The result is a jump into
nowhere, followed by SIGSEGV or SIGILL (oddly I've seen both).  If it fails in
the outer-function-return case, I'll bet it fails with ucontext trickery too.

http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
http://stackoverflow.com/questions/2929281/are-nested-functions-a-bad-thing-in-gcc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: inner.c
Type: text/x-csrc
Size: 612 bytes
Desc: not available
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20121008/fefbbb63/attachment-0001.bin>


More information about the Gluster-devel mailing list