https://bugs.kde.org/show_bug.cgi?id=361615

--- Comment #5 from earl_c...@yahoo.com ---
I compiled and ran the submitted test case both with and without valgrind. This
shows that under valgrind, the child process terminates with SIGKILL rather
than the expected SIGTERM.

$ gcc -o test test.c -lpthread && ./test
Signalled with 15

$ gcc -o test test.c -lpthread && valgrind ./test
==14625== Memcheck, a memory error detector
==14625== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==14625== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==14625== Command: ./test
==14625== 
==14626== 
==14626== Process terminating with default action of signal 15 (SIGTERM)
==14626==    at 0x4124B96: ??? (syscall-template.S:81)
==14626==    by 0x412493C: sleep (sleep.c:137)
==14626==    by 0x804868E: slavethread (in /tmp/test)
==14626==    by 0x4058F71: start_thread (pthread_create.c:312)
==14626==    by 0x415AF8D: clone (clone.S:129)
==14626== 
==14626== HEAP SUMMARY:
==14626==     in use at exit: 136 bytes in 1 blocks
==14626==   total heap usage: 1 allocs, 0 frees, 136 bytes allocated
==14626== 
==14626== LEAK SUMMARY:
==14626==    definitely lost: 0 bytes in 0 blocks
==14626==    indirectly lost: 0 bytes in 0 blocks
==14626==      possibly lost: 136 bytes in 1 blocks
==14626==    still reachable: 0 bytes in 0 blocks
==14626==         suppressed: 0 bytes in 0 blocks
==14626== Rerun with --leak-check=full to see details of leaked memory
==14626== 
==14626== For counts of detected and suppressed errors, rerun with: -v
==14626== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Signalled with 9
test: test.c:52: main: Assertion `15 == (((__extension__ (((union {
__typeof(status) __in; int __i; }) { .__in = (status) }).__i))) & 0x7f)'
failed.
==14625== 
==14625== Process terminating with default action of signal 6 (SIGABRT)
==14625==    at 0x409D687: raise (raise.c:56)
==14625==    by 0x40A0AB2: abort (abort.c:89)
==14625==    by 0x40967C6: __assert_fail_base (assert.c:92)
==14625==    by 0x4096876: __assert_fail (assert.c:101)
==14625==    by 0x8048816: main (in /tmp/test)
==14625== 
==14625== HEAP SUMMARY:
==14625==     in use at exit: 0 bytes in 0 blocks
==14625==   total heap usage: 3 allocs, 3 frees, 550 bytes allocated
==14625== 
==14625== All heap blocks were freed -- no leaks are possible
==14625== 
==14625== For counts of detected and suppressed errors, rerun with: -v
==14625== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Aborted

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to