assert broken?

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Thu Feb 17 19:05:00 GMT 2011


On 2/17/2011 1:49 PM, Stan wrote:
>
> I've run cygcheck and tried this on two systems with the same
> results; at this point I'm assuming the problem is not local so I'm
> not including the typically requested data. I will be glad to follow
> up if my assumption turns out to be incorrect.
>
> The issue is triggering an assert dumps core. Trivial test case:
>
> #include<assert.h>
>
> int main()
> {
>     assert(1==0);
>     return 1;
> }
>
> causes a core dump. I originally noticed this is a gdb session and the
> triggered assert leaves a bt showing windows info so it looks like the
> stack unwinding is having a bad day.

When an assertion fails, it calls abort().

<http://pubs.opengroup.org/onlinepubs/009695399/functions/assert.html>

Are you saying it's not doing this?

-- 
Larry

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
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



More information about the Cygwin mailing list