This is the mail archive of the glibc-bugs@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]

[Bug dynamic-link/19758] New: Typo in EXTRA_LD_ENVVARS for x86-64


https://sourceware.org/bugzilla/show_bug.cgi?id=19758

            Bug ID: 19758
           Summary: Typo in EXTRA_LD_ENVVARS for x86-64
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h has

/* Recognizing extra environment variables.  For 64-bit applications,
   branch prediction performance may be negatively impacted when the
   target of a branch is more than 4GB away from the branch.  Add the
   Prefer_MAP_32BIT_EXEC bit so that mmap will try to map executable
   pages with MAP_32BIT first.  NB: MAP_32BIT will map to lower 2GB,
   not lower 4GB, address.  Prefer_MAP_32BIT_EXEC reduces bits available
   for address space layout randomization (ASLR).  Prefer_MAP_32BIT_EXEC
   is always disabled for SUID programs and can be enabled by setting
   environment variable, LD_PREFER_MAP_32BIT_EXEC.  */
#define EXTRA_LD_ENVVARS \
  case 21:                                                            \
    if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0)           \
      GLRO(dl_x86_cpu_features).feature[index_Prefer_MAP_32BIT_EXEC]  \
        = bit_Prefer_MAP_32BIT_EXEC;                                  \
^^^^^^^^^^^^^^
It should be |=, not =.

    break;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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