From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60126 invoked by alias); 31 Jul 2018 12:47:56 -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 60117 invoked by uid 89); 31 Jul 2018 12:47:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=privileged, mistakes, mistake, H*Ad:D*comcast.net X-HELO: mail-wm0-f66.google.com Received: from mail-wm0-f66.google.com (HELO mail-wm0-f66.google.com) (74.125.82.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 31 Jul 2018 12:47:54 +0000 Received: by mail-wm0-f66.google.com with SMTP id w24-v6so1547659wmc.1 for ; Tue, 31 Jul 2018 05:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xuI/mvj/YkjmangKOfwfVnaPA29E0xjbfVrxCba/zi8=; b=BHgWi+LbuRG35j5iTsDPigZCO6IgkvaVEG3ST65xL1ecYND4NEzHgEMFFGao4N82HZ XGZIC28YtWejlMyPVRPXrXiZcy2OQMu7mXnr7n7BJdKsSwB0jXAk6JNy9cNbA1s80w+2 W8fhsSQG4P1kBNzwx7ajDbWQX9IzbjUulWjYAIvUIjXcyLbfYSfQZwXRlYvCZs5Y5QDB SIVKYXeT3wE6lIDUZPasIEw4Il/6K0OVBFDmfy5S6Sgrw8/CW5bqiar80yqYW6rdJ0EC AWDQDmK/wd48RtmrAKtblNJX1N2ngyGC6krTbDpRDG6S8Oc1bo3T7diTq8dlt1NOP/FN nM3A== Return-Path: Received: from localhost (host109-147-66-79.range109-147.btcentralplus.com. [109.147.66.79]) by smtp.gmail.com with ESMTPSA id u18-v6sm30200301wrm.80.2018.07.31.05.47.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 05:47:51 -0700 (PDT) Date: Tue, 31 Jul 2018 12:47:00 -0000 From: Andrew Burgess To: Simon Marchi Cc: Paul Koning , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: Disable address space randomization for a test Message-ID: <20180731124749.GG3155@embecosm.com> References: <20180730185045.15565-1-andrew.burgess@embecosm.com> <345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net> <20180730190155.GF3155@embecosm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Fortune: semper en excretus X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00807.txt.bz2 * 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