Firstly, relies on uninitialized stack data to create a (hopefully-invalid and crash-causing pthread_attr_t:
Secondly it calls pthread_exit() with an error code from a signal handler installed on the main thread:
|
pthread_exit((void*)PTS_FAIL); |
The author seems to think that calling pthead_exit() like this will cause the overall test to return the error code, but that is now how it works. Calling pthead_exit form the main thread always exist with code 0.. the value passed to pthread_exit is only used when the thread is being joined.. not when exiting the process. This means the test will print that it failed Test FAILED: Did not receive segmentation fault signal, waited 10 seconds but actually return zero as the process exit code.
Firstly, relies on uninitialized stack data to create a (hopefully-invalid and crash-causing pthread_attr_t:
posixtestsuite/conformance/interfaces/pthread_create/10-1.c
Line 97 in 869e266
Secondly it calls pthread_exit() with an error code from a signal handler installed on the main thread:
posixtestsuite/conformance/interfaces/pthread_create/10-1.c
Line 89 in 869e266
The author seems to think that calling pthead_exit() like this will cause the overall test to return the error code, but that is now how it works. Calling pthead_exit form the main thread always exist with code 0.. the value passed to pthread_exit is only used when the thread is being joined.. not when exiting the process. This means the test will print that it failed
Test FAILED: Did not receive segmentation fault signal, waited 10 secondsbut actually return zero as the process exit code.