This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: assert creates unusable core dump on current stable Cygwin release
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