On 7/18/2011 5:46 AM, Andy Polyakov via RT wrote:
> Hi,
>
> [snip]
>>
>>      If I add printf() in signal handler, I see that it is called, and that
>> siglongjmp() works. With my printf(), my program doesn't abort with
>> SIGILL anymore but with SIGBUS (?!).
>

It is illegal for a signal handler to call anything that is not an 
"asynchronous safe" function.  Calling I/O functions is a bad idea.  A 
good discussion can be found at 
https://www.securecoding.cert.org/confluence/display/seccode/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers

   --David


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to