[Bug libc/26203] New: GLRO(dl_x86_cpu_features) may not be intialized

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26203] New: GLRO(dl_x86_cpu_features) may not be intialized

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26203

            Bug ID: 26203
           Summary: GLRO(dl_x86_cpu_features) may not be intialized
           Product: glibc
           Version: 2.32
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
            Target: i386, x86-64

This patch:

diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c
index 311502dee3..3ddc7104f4 100644
--- a/sysdeps/x86/cacheinfo.c
+++ b/sysdeps/x86/cacheinfo.c
@@ -769,6 +769,8 @@ init_cacheinfo (void)
   unsigned int threads = 0;
   const struct cpu_features *cpu_features = __get_cpu_features ();

+  assert (cpu_features->basic.kind != arch_kind_unknown);
+
   if (cpu_features->basic.kind == arch_kind_intel)
     {
       data = handle_intel (_SC_LEVEL1_DCACHE_SIZE, cpu_features);

caused:

FAIL: elf/tst-libc_dlvsym-static

GLRO(dl_x86_cpu_features) in ld.so is initialized by init_cpu_features, which
is invoked by DL_PLATFORM_INIT from _dl_sysdep_start.  But ld.so loaded by
static executable never calls _dl_sysdep_start.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26203] GLRO(dl_x86_cpu_features) may not be intialized

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26203

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.32

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch:

https://sourceware.org/pipermail/libc-alpha/2020-July/115788.html

is posted to initialize CPU info as the part of relocation.

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