This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fun? with libsigsegv


On Fri, Jul 17, 2009 at 10:55:13PM +0000, Eric Blake wrote:
>Eric Blake <ebb9 <at> byu.net> writes:
>>Of course, given the code, that meant I wasn't using libsigsegv like I
>>thought I was.  So, with my typo corrected, I'm (unfortunately) still
>>seeing libsigsegv interference:
>>
>>$ ./foo fclose -1, errno 9 Aborted (core dumped)
>
>Even more depressing - this looks like a regression.  The same STC,
>compiled with libsigsegv under cygwin 1.5, works in that environment.
>
>And I'm not sure what to do in gdb to try and get more useful
>information:

AFAICT, the libsigsegv handler is overriding the "myfault" stuff in
Cygwin and is causing a fault for something that should be ignored.  The
"fault" in this case is coming from our old friend
verifyable_object_isvalid.  We expect faults there and they are supposed
to be ignored.

The regression from 1.5 is because this didn't cause a fault in 1.5 so
it looks like something changed in newlib.

Looking at libsigsegv's code, I don't think it is being smart enough
about Cygwin.

It isn't clear to me why sigaltstack is needed here since I don't see
anything special happening with the stack.  It looks like you could
modify libsigsegv to just avoid trying to do anything with the signal
stack and you could use Cygwin's signal handlers directly.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]