From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107038 invoked by alias); 31 Jul 2018 13:32:36 -0000 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 Received: (qmail 106757 invoked by uid 89); 31 Jul 2018 13:32:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 31 Jul 2018 13:32:34 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w6VDWRWe015627 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 31 Jul 2018 09:32:32 -0400 Received: by simark.ca (Postfix, from userid 112) id C495B1EF29; Tue, 31 Jul 2018 09:32:27 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id A4C9F1E183; Tue, 31 Jul 2018 09:32:25 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 31 Jul 2018 13:32:00 -0000 From: Simon Marchi To: Andrew Burgess Cc: Paul Koning , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: Disable address space randomization for a test In-Reply-To: <20180731124749.GG3155@embecosm.com> References: <20180730185045.15565-1-andrew.burgess@embecosm.com> <345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net> <20180730190155.GF3155@embecosm.com> <20180731124749.GG3155@embecosm.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00808.txt.bz2 On 2018-07-31 08:47, Andrew Burgess wrote: > * Simon Marchi [2018-07-30 15:49:01 -0400]: > >> On 2018-07-30 15:01, Andrew Burgess wrote: >> > > Does that turn off address randomization? The keyword implies the >> > > opposite (double negative, so "disable... off" means "turn on"). >> > >> > That's a very good question... now I just have to figure out why my >> > incorrect patch fixed the problem I was seeing.... watch this space... >> >> GDB usually disables address randomization by default, so I was also >> wondering why this would be needed. Do you have a scenario where GDB >> doesn't disable it by default? > > Thank you to you both for pointing me in the right direction. > > It turned out the mistake was user error. I've recently switched to a > jenkins/docker combo to try and streamline testing my patches. > > When running GDB under docker I'm having to supply the '--privileged' > flag in order to allow GDB to function correctly. > > The problem was that I use a separate docker instance to build GDB and > then a set of instances to test GDB in different modes (native, > gdbserver, etc). When testing GDB I supplied the '--privileged', but > not when building GDB. As a result configure decided that my system > didn't support the personality API, and so all the code to disable > address space randomization was not compiled into GDB. > > As for why I failed to spot this, again user error, but far less > interesting, I forgot I pushed a change to the scripts I used for > comparing test results. > > Anyway, sorry for the noise, and thanks for the help figuring out my > mistakes. > > Thanks, > Andrew Well, that's good information to know, thanks! Simon