From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5282 invoked by alias); 21 May 2008 19:21:23 -0000 Received: (qmail 5273 invoked by uid 22791); 21 May 2008 19:21:21 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 21 May 2008 19:20:59 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.8/8.13.8) with ESMTP id m4LJKKZO092352 for ; Wed, 21 May 2008 19:20:20 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m4LJKKZA3629228 for ; Wed, 21 May 2008 21:20:20 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m4LJKJi9016107 for ; Wed, 21 May 2008 21:20:20 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m4LJKJXS016101; Wed, 21 May 2008 21:20:19 +0200 Message-Id: <200805211920.m4LJKJXS016101@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 21 May 2008 21:20:19 +0200 Subject: Re: [patch] Re: longjmp handling vs. glibc LD_POINTER_GUARD problems To: pedro@codesourcery.com (Pedro Alves) Date: Thu, 22 May 2008 00:11:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org, dan@codesourcery.com (Daniel Jacobowitz) In-Reply-To: <200805202353.47984.pedro@codesourcery.com> from "Pedro Alves" at May 20, 2008 11:53:47 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00647.txt.bz2 Pedro Alves wrote: > ... here's an updated patch. The tests are the same as before. Tested on > x86_86-unknown-linux-gnu, and confirmed longjmp.exp also passes > cleanly on x86-pc-linux-gnu. > > What do you think? Looks like the right way to go for me. Unfortunately, I doesn't quite work yet on the platforms I've tried it (s390, s390x, powerpc, powerpc64, and spu) -- the "next" over 110 call_longjmp (&env); /* patt2 */ always causes the program to run to its end. I didn't get the chance yet to debug this problem ... Another issue with your patch is the use of frame_id_inner ... I'd rather get rid of this function instead of adding new uses, because this really requires that it is possible to compare two stack (frame) addresses along a linear order. This breaks for me in multi-architecture scenarios, but even on existing targets it may not always work OK (e.g. if signal handlers run on a different frame, or if the code uses some sort of user-level threading or coroutine library ...). Maybe instead of comparing frame_ids, it would be better to check whether or not a frame with the given ID still exists in the current backtrace? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com