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:subject:references:cc:to:reply-to:from :message-id:date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=ho03RndUH0sRQZe2 q7Xh+HfLDU7q6//nGfugGSAQwSZY3DgUAUe3V2PLAokeYZZcieDEhJlu4a90vb66 9XJlxLRKBzrI2bA9o69P7KX2MNXGgspS256chwczL/HV9T1+Xp2Uk7vKRblHLzZ0 XJBwQ6PYaIhrh8hthQoOO9wgmJQ= 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:subject:references:cc:to:reply-to:from :message-id:date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=jBhYd3WPpeGJQ8Kb1gRU0I UtuhU=; b=cLL94MUbf5/myWbIp75KUdX8UYesrMxak4i7NrrqT3E7I3PqVm/FBu ACk77y8NjByHs71+4Na2ZnGdxvaUY8LWing/hTqfzj9o3A2e22lmQywEvoYUYLTR fieS9lK9dM750wfR1QomM8VHtd8kpiE52VgjS95xBz7o4GePj5+v4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-languages-length:1367, primarily, 2425, alert X-HELO: out1-smtp.messagingengine.com Subject: Re: 2.4-2.5 x64: bash crashes on backticks, gdb crashes on opening core dump References: <56EE67C4 DOT 1070900 AT mail DOT mipt DOT ru> Cc: Ivan Pozdeev To: cygwin AT cygwin DOT com Reply-To: cygwin AT cygwin DOT com From: Jon Turney Message-ID: <56F11625.7000904@dronecode.org.uk> Date: Tue, 22 Mar 2016 09:53:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <56EE67C4.1070900@mail.mipt.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 20/03/2016 09:05, Ivan Pozdeev wrote: > gdb > --- > I managed to debug the gdb session with VisualGDB (trial). > It turns out, the root cause is that the /bin/sh executable is x64, but > the core file `sh.exe.core' - of the same executable - has i386 format! > (objdump: <...>sh.exe.core: file format elf32-i386) > > And gdb doesn't check that. Created ticket (incl. patch): > https://sourceware.org/bugzilla/show_bug.cgi?id=19834 > > Now I'm stumped. How can this be?! Does this mean `dumper' is faulty? > If this was normal, gdb would likely be able to process the dumps. > > summary > ------- > Writing this primarily to alert the community of these apparent critical > bugs. > Hints on where to look inside `dumper' would be more than welcome, too. This is clearly a bug in dumper, which doesn't look like it's been ported to x86_64. See [1] Ideally gdb wouldn't crash when presented with such an invalid core dump. The strangeness which is a cygwin core dump doesn't appear to be documented anywhere but in the source code of dumper, but it is an elf file containing the memory image of the dumper process, with elf notes containing various Win32 API status structures. [1] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/utils/dumper.cc;hb=HEAD#l628 -- 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