delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/10/09/17:29:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=crlg8lTaG+sHfB8C
mpYpZHFUErdkHBU3qd1cQbtTsU2EvkeDZcLjpcvbwvoArSAdniZaASxQcqNNzdBG
6XSJIh0I5CYmwGW/tEbx14fdf0ilO4hDwuwNzbGm5HvnBTBppTpOKQpm6Br2P8j1
gvWM5zBW/R97xn3dYDTcORXaGjk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=2Xvvd7t2gAfkL2CwBx0WtE
facTw=; b=py96v8Vvwaq73XrJGt217CiCNiyc997NjMr2U4Vmb2jUM9bhhaDlpk
CZMkLwH6xdMwWo09dk5KOz1TYjtlhVFBcGjErx03UX+eCdLt9l/zhmlnVZmnJmlm
QhfYWYFkAOaOo/BZC7WZOkpj5U5ZqTvhE97NAzdomH8/eYhw9gbeg=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=
X-HELO: smtp-out-so.shaw.ca
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: assert creates unusable core dump on current stable Cygwin release
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <CALK-3mJyg6pox9a+ZNgGmspcxBFcgGJ3XymXAOOPP6_Z_tSUjQ AT mail DOT gmail DOT com> <2300fe24-fc50-3d1c-6b1b-bf6da6022d2e AT SystematicSw DOT ab DOT ca> <b8379f49-3e22-23c8-80d9-d18f45e10a42 AT dronecode DOT org DOT uk>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Openpgp: preference=signencrypt
Message-ID: <71be3508-b11e-4681-eac6-9d44845088c7@SystematicSw.ab.ca>
Date: Wed, 9 Oct 2019 15:28:14 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <b8379f49-3e22-23c8-80d9-d18f45e10a42@dronecode.org.uk>
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019