This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Disable address space randomization for a test


* Simon Marchi <simon.marchi@polymtl.ca> [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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]