public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: assert creates unusable core dump on current stable Cygwin release
Date: Wed, 09 Oct 2019 15:31:00 -0000	[thread overview]
Message-ID: <2300fe24-fc50-3d1c-6b1b-bf6da6022d2e@SystematicSw.ab.ca> (raw)
In-Reply-To: <CALK-3mJyg6pox9a+ZNgGmspcxBFcgGJ3XymXAOOPP6_Z_tSUjQ@mail.gmail.com>

On 2019-10-09 01:14, Biswapriyo Nath wrote:
> * mintty version: mintty 3.0.6 (x86_64-pc-cygwin)
> * cygwin version: 3.1.0-0.6
> * code:
> 
> #include <assert.h>
> 
> int main() {
>   int x = 1;
>   assert(x == 0);
> }
> 
> * Expected result: The terminal should show this message which appers
> in latest stable cygwin version.
> assertion "x == 0" failed: file "test.c", line 6, function: main
> 
> * Actual result: terminal only shows "Aborted (core dumped)".

I also get the core dump, which is un-gdb-able below, as is it's core dump, on
*current stable* Cygwin 64 releases *AND* see the message!

$ gcc -g -Og -Wall -Wextra -o t t.c
$ ./t
assertion "x == 0" failed: file "t.c", line 5, function: main
*** starting debugger for pid 52441, tid 15616
*** continuing pid 52441 from debugger call (1)
Aborted (core dumped)
$ gdb ./t.exe ./t.exe.core
GNU gdb (GDB) (Cygwin 8.1.1-1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./t.exe...done.

warning: core file may not match specified executable file.
[New Thread 0x3df4]
[New Thread 0x6850]
[New Thread 0x56dc]
[New Thread 0xf854]
[New Thread 0xd3cc]
[New Thread 0xbda8]

warning: Unexpected size of section `.reg/15860' in core file.
/wip/cygport-git/gdb/gdb-8.1.1-1.x86_64/src/gdb-8.1.1/gdb/corelow.c:548:
internal-error: void get_core_register_section(regcache*, const regset*, const
char*, int, int, const char*, int): Assertion `core_vec' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/wip/cygport-git/gdb/gdb-8.1.1-1.x86_64/src/gdb-8.1.1/gdb/corelow.c:548:
internal-error: void get_core_register_section(regcache*, const regset*, const
char*, int, int, const char*, int): Assertion `core_vec' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
$ gdb ./t
GNU gdb (GDB) (Cygwin 8.1.1-1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./t...done.
(gdb) run
Starting program: /home/bwi/src/t
[New Thread 40060.0x1073c]
[New Thread 40060.0x2df0]
[New Thread 40060.0x49b4]
[New Thread 40060.0x12b8]
assertion "x == 0" failed: file "t.c", line 5, function: main

Thread 1 "t" received signal SIGABRT, Aborted.
0x00000000ffffe458 in ?? ()
(gdb) bt
#0  0x00000000ffffe458 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) q
A debugging session is active.

        Inferior 1 [process 40060] will be killed.

Quit anyway? (y or n) y
$ uname -srvmo
CYGWIN_NT-10.0 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64 Cygwin
$ head /proc/version
CYGWIN_NT-10.0-17763 version 3.0.7-338.x86_64 (corinna@calimero) (gcc version
7.4.0 20181206 (Fedora Cygwin 7.4.0-1) (GCC) ) 2019-04-30 18:08 UTC
$ gcc --version
gcc (GCC) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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

  parent reply	other threads:[~2019-10-09 15:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09  7:16 assert does not show output in cygwin test build Biswapriyo Nath
2019-10-09 10:03 ` Takashi Yano
2019-10-09 10:39   ` Pavel Fedin
2019-10-09 10:54     ` Takashi Yano
2019-10-09 11:27       ` Pavel Fedin
2019-10-09 12:39         ` Biswapriyo Nath
2019-10-09 15:31 ` Brian Inglis [this message]
2019-10-09 17:10   ` assert creates unusable core dump on current stable Cygwin release Jon Turney
2019-10-09 21:28     ` Brian Inglis
2019-10-10 19:19       ` Jon Turney
2019-10-10 20:57         ` Csaba Raduly
2019-10-10 22:20           ` Brian Inglis
2019-10-13 16:27             ` Jon Turney
2019-10-13 18:14               ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2300fe24-fc50-3d1c-6b1b-bf6da6022d2e@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).