Re: [PATCH] Restore behavior of disabling address randomization by default on GDBserver

Simon Marchi
2018-08-22T17:38:15Z

On 2018-08-22 12:14, Pedro Alves wrote:
> On 08/22/2018 05:05 PM, Simon Marchi wrote:
>> Commit
>>
>> c12a508 ("Add client_state struct.")
>>
>> inadvertently changed the default behavior of GDBserver wrt address
>> randomization. The old disable_randomization global variable was
>> initialized to 1, whereas the corresponding field in the client_state
>> structure is initialized to 0.
>>
>> This fixes
>>
>> make check TESTS="gdb.base/jit-simple.exp"
>> RUNTESTFLAGS="--target_board=native-gdbserver"
>> make check TESTS="gdb.base/execl-update-breakpoints.exp"
>> RUNTESTFLAGS="--target_board=native-gdbserver"
>>
>> Note that the execl-update-breakpoints.exp would only fail on systems
>> where the toolchain emits position-independent executables by default
>> (otherwise the main executable position is never randomized, so the
>> value of disable_randomization didn't matter).
>
> Thanks for fixing this!
>
> This is OK, but please double-check the patch/commit, since it
> seems to include the same hunk twice. Kind of looks like
> the fix diff made it to the commit log?

Oops yes, it's because I use "git commit -v" and managed to include that
diff in the commit message by mistake.

Pushed with that fixed.

Simon