From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31814 invoked by alias); 7 Oct 2014 17:01:54 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 31802 invoked by uid 89); 7 Oct 2014 17:01:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 07 Oct 2014 17:01:53 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s97H1nmK026431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 Oct 2014 13:01:49 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s97H1loM031307; Tue, 7 Oct 2014 13:01:48 -0400 Message-ID: <54341C7B.70700@redhat.com> Date: Tue, 07 Oct 2014 17:01:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Eli Zaretskii , gdb@sourceware.org Subject: Re: Reporting the STATUS_INVALID_UNWIND_TARGET fatal error References: <831tqtkn9e.fsf@gnu.org> In-Reply-To: <831tqtkn9e.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-10/txt/msg00017.txt.bz2 On 09/30/2014 06:54 PM, Eli Zaretskii wrote: > In the native MinGW build of GDB, we currently do not interpret > STATUS_INVALID_UNWIND_TARGET, neither as a Posix-style signal nor as a > Windows exception (under debugexceptions). As result, GDB says > something like > > gdb: unknown target exception 0xc0000029 at 0x7c9502cc > > Would it make sense to report this as SIGSEGV instead? Doesn't sound like segmentation fault, but rather the runtime detecting some corruption. Like, e.g., glibc's malloc/free detecting a heap corruption and printing about that. > > This happens, e.g., when a thread tries to longjmp using stack > information recorded by a different thread. What will GDB report in > such a case on GNU/Linux or other Posix platforms? I think nothing. In absence of a more specific signal, I think SIGTRAP is the best match, for being a "debugger" signal. This has the advantage that SIGTRAP is not passed to the program by default, so a plain "continue" should suppress the exception, while "signal SIGTRAP" will pass it to the program (which I guess will usually terminate the application). SIGTRAP is what Valgrind's builtin gdbserver reports too when it traps on invalid reads/writes, etc, which sounds similar to this. Though overall, I think it'd be better if we added a new "target exception" waitkind or some such, and stopped trying to masquerade Windows exceptions as Unix signals. Thanks, Pedro Alves