From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: assert creates unusable core dump on current stable Cygwin release
Date: Wed, 09 Oct 2019 21:28:00 -0000 [thread overview]
Message-ID: <71be3508-b11e-4681-eac6-9d44845088c7@SystematicSw.ab.ca> (raw)
In-Reply-To: <b8379f49-3e22-23c8-80d9-d18f45e10a42@dronecode.org.uk>
On 2019-10-09 11:10, Jon Turney wrote:
> On 09/10/2019 16:31, Brian Inglis wrote:
>> 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!
>
> As far as I'm aware, the core-dump tool 'dumper' has never been fixed for
> x86_64, so I wouldn't expect this to work. See [1].
>
> [1] https://cygwin.com/ml/cygwin/2016-03/msg00464.html
Given that it's used elsewhere, is there more to it than just:
int
dumper::init_core_dump ()
{
bfd_init ();
- core_bfd = bfd_openw (file_name, "elf32-i386");
+ core_bfd = bfd_openw (file_name, "elf64-x86");
if (core_bfd == NULL)
{
bfd_perror ("opening bfd");
goto failed;
}
if (!bfd_set_format (core_bfd, bfd_core))
{
bfd_perror ("setting bfd format");
goto failed;
}
- if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0))
+ if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, bfd_mach_x86_64))
{
bfd_perror ("setting bfd architecture");
goto failed;
}
return 1;
failed:
dumper_abort ();
return 0;
}
--
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
next prev parent reply other threads:[~2019-10-09 21:28 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 ` assert creates unusable core dump on current stable Cygwin release Brian Inglis
2019-10-09 17:10 ` Jon Turney
2019-10-09 21:28 ` Brian Inglis [this message]
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=71be3508-b11e-4681-eac6-9d44845088c7@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).