This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: glibc 2.24 -- Release blockers


On Thu, Jul 14, 2016 at 01:27:54PM +0200, Florian Weimer wrote:
[...]
> GDB does this to disable randomization:
> 
>       errno = 0;
>       personality_orig = personality (0xffffffff);
>       if (errno == 0 && !(personality_orig & ADDR_NO_RANDOMIZE))
>         {
>           personality_set = 1;
>           personality (personality_orig | ADDR_NO_RANDOMIZE);
>         }
>       if (errno != 0 || (personality_set
>                          && !(personality (0xffffffff) & 
> ADDR_NO_RANDOMIZE)))
>         warning (_("Error disabling address space randomization: %s"),
>                  safe_strerror (errno));
> 
> (0xffffffff should really be -1.)

0xffffffff is more portable, see e.g. commit glibc-2.22-637-ge0043e1
for details.


-- 
ldv

Attachment: pgpXzbL8xwYTU.pgp
Description: PGP signature


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