swap back to f2
finish f2, should swap to f1
==11748== Use of uninitialised value of size 8
==11748== at 0x400846: f2 (test_libucontext.c:49)
==11748== by 0x4E56B44: (below main) (libc-start.c:287)
==11748== Uninitialised value was created by a stack allocation
==11748== at 0x400B81: ??? (swapcontext.S:63)
==11748==
==11748== Invalid read of size 8
==11748== at 0x400FD6: libucontext_trampoline (common-trampoline.c:23)
==11748== by 0x6017E7: ??? (in /home/dangyajun/SMB_share/xp/libucontext-1.2/build/test_libucontext.c)
==11748== by 0x4E56B44: (below main) (libc-start.c:287)
==11748== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==11748==
==11748==
==11748== Process terminating with default action of signal 11 (SIGSEGV)
==11748== Access not within mapped region at address 0x0
==11748== at 0x400FD6: libucontext_trampoline (common-trampoline.c:23)
==11748== by 0x6017E7: ??? (in /home/dangyajun/SMB_share/xp/libucontext-1.2/build/test_libucontext.c)
==11748== by 0x4E56B44: (below main) (libc-start.c:287)
==11748== If you believe this happened as a result of a stack
==11748== overflow in your program's main thread (unlikely but
==11748== possible), you can try to increase the size of the
==11748== main thread stack using the --main-stacksize= flag.
==11748== The main thread stack size used in this run was 8388608.
--11748-- REDIR: 0x4eb1600 (libc.so.6:free) redirected to 0x4c29e20 (free)
==11748==
==11748== HEAP SUMMARY:
==11748== in use at exit: 0 bytes in 0 blocks
==11748== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==11748==
==11748== All heap blocks were freed -- no leaks are possible
==11748==
==11748== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==11748==
==11748== 1 errors in context 1 of 2:
==11748== Invalid read of size 8
==11748== at 0x400FD6: libucontext_trampoline (common-trampoline.c:23)
==11748== by 0x6017E7: ??? (in /home/dangyajun/SMB_share/xp/libucontext-1.2/build/test_libucontext.c)
==11748== by 0x4E56B44: (below main) (libc-start.c:287)
==11748== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==11748==
==11748==
==11748== 1 errors in context 2 of 2:
==11748== Use of uninitialised value of size 8
==11748== at 0x400846: f2 (test_libucontext.c:49)
==11748== by 0x4E56B44: (below main) (libc-start.c:287)
==11748== Uninitialised value was created by a stack allocation
==11748== at 0x400B81: ??? (swapcontext.S:63)
==11748==
==11748== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Segmentation fault
help!
swap back to f2 finish f2, should swap to f1 ==11748== Use of uninitialised value of size 8 ==11748== at 0x400846: f2 (test_libucontext.c:49) ==11748== by 0x4E56B44: (below main) (libc-start.c:287) ==11748== Uninitialised value was created by a stack allocation ==11748== at 0x400B81: ??? (swapcontext.S:63) ==11748== ==11748== Invalid read of size 8 ==11748== at 0x400FD6: libucontext_trampoline (common-trampoline.c:23) ==11748== by 0x6017E7: ??? (in /home/dangyajun/SMB_share/xp/libucontext-1.2/build/test_libucontext.c) ==11748== by 0x4E56B44: (below main) (libc-start.c:287) ==11748== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==11748== ==11748== ==11748== Process terminating with default action of signal 11 (SIGSEGV) ==11748== Access not within mapped region at address 0x0 ==11748== at 0x400FD6: libucontext_trampoline (common-trampoline.c:23) ==11748== by 0x6017E7: ??? (in /home/dangyajun/SMB_share/xp/libucontext-1.2/build/test_libucontext.c) ==11748== by 0x4E56B44: (below main) (libc-start.c:287) ==11748== If you believe this happened as a result of a stack ==11748== overflow in your program's main thread (unlikely but ==11748== possible), you can try to increase the size of the ==11748== main thread stack using the --main-stacksize= flag. ==11748== The main thread stack size used in this run was 8388608. --11748-- REDIR: 0x4eb1600 (libc.so.6:free) redirected to 0x4c29e20 (free) ==11748== ==11748== HEAP SUMMARY: ==11748== in use at exit: 0 bytes in 0 blocks ==11748== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==11748== ==11748== All heap blocks were freed -- no leaks are possible ==11748== ==11748== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) ==11748== ==11748== 1 errors in context 1 of 2: ==11748== Invalid read of size 8 ==11748== at 0x400FD6: libucontext_trampoline (common-trampoline.c:23) ==11748== by 0x6017E7: ??? (in /home/dangyajun/SMB_share/xp/libucontext-1.2/build/test_libucontext.c) ==11748== by 0x4E56B44: (below main) (libc-start.c:287) ==11748== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==11748== ==11748== ==11748== 1 errors in context 2 of 2: ==11748== Use of uninitialised value of size 8 ==11748== at 0x400846: f2 (test_libucontext.c:49) ==11748== by 0x4E56B44: (below main) (libc-start.c:287) ==11748== Uninitialised value was created by a stack allocation ==11748== at 0x400B81: ??? (swapcontext.S:63) ==11748== ==11748== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) Segmentation fault