From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6685 invoked by alias); 24 Mar 2008 15:06:16 -0000 Received: (qmail 6677 invoked by uid 22791); 24 Mar 2008 15:06:15 -0000 X-Spam-Check-By: sourceware.org Received: from host0.dyn.jankratochvil.net (HELO host0.dyn.jankratochvil.net) (89.250.240.59) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 24 Mar 2008 15:05:56 +0000 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.2/8.14.1) with ESMTP id m2OF5oZp009471; Mon, 24 Mar 2008 16:05:50 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.2/8.14.2/Submit) id m2OF5osM009467; Mon, 24 Mar 2008 16:05:50 +0100 Date: Mon, 24 Mar 2008 15:06:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Alexandre Oliva Subject: [patch] Fix testsuite gdb.base/prelink.exp x86 unreliability Message-ID: <20080324150550.GA9183@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-IsSubscribed: yes 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-03/txt/msg00356.txt.bz2 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 274 Hi, on i686 it fails in about 30% of cases when the system is already prelinked. The problem is that prelink links the test library usually to the same place. It is 100% PASS afterwards. The problem is not reproducible on non-i.86 arches (such as x86_64). Regards, Jan --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="gdb-prelink-i386.patch" Content-length: 1450 2008-03-21 Jan Kratochvil Fix random false FAILs on i386. * gdb.base/prelink.exp: Use `--no-exec-shield' for prelink. --- ./gdb/testsuite/gdb.base/prelink.exp 1 Jan 2008 22:53:19 -0000 1.7 +++ ./gdb/testsuite/gdb.base/prelink.exp 21 Mar 2008 20:09:59 -0000 @@ -47,7 +47,15 @@ if { [gdb_compile "${srcdir}/${subdir}/$ return -1 } -if {[catch "system \"prelink -qNR ${libfile}\""] != 0} { +# `--no-exec-shield' is for i386 where prelink in the exec-shield mode is +# forced to push all the libraries tight together to fit into the first two +# memory areas (either the ASCII Shield area or at least below the executable). +# In this case its -R option cannot be applied and we falsely FAIL here as if +# the system is already prelinked prelink has no choice how to randomize the +# single new unprelinked library address without wasting the first one/two +# memory areas. We do not care of the efficiency of loading such resulting +# exec-shield unfriendly prelinked library. +if {[catch "system \"prelink -qNR --no-exec-shield ${libfile}\""] != 0} { # Maybe we don't have prelink. return -1 } @@ -92,7 +100,7 @@ if {[catch "system \"prelink -uN ${libfi untested "${testfile}.so was not prelinked, maybe system libraries are not prelinked?" return 0 } -catch "system \"prelink -qNR ${libfile}\"" +catch "system \"prelink -qNR --no-exec-shield ${libfile}\"" # Start with a fresh gdb --WIyZ46R2i8wDzkSu--