public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/26203] New: GLRO(dl_x86_cpu_features) may not be intialized
@ 2020-07-04 12:32 hjl.tools at gmail dot com
  2020-07-04 15:23 ` [Bug libc/26203] " hjl.tools at gmail dot com
  2020-10-16 23:54 ` hjl.tools at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-04 12:32 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/26203] GLRO(dl_x86_cpu_features) may not be intialized
  2020-07-04 12:32 [Bug libc/26203] New: GLRO(dl_x86_cpu_features) may not be intialized hjl.tools at gmail dot com
@ 2020-07-04 15:23 ` hjl.tools at gmail dot com
  2020-10-16 23:54 ` hjl.tools at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-04 15:23 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/26203] GLRO(dl_x86_cpu_features) may not be intialized
  2020-07-04 12:32 [Bug libc/26203] New: GLRO(dl_x86_cpu_features) may not be intialized hjl.tools at gmail dot com
  2020-07-04 15:23 ` [Bug libc/26203] " hjl.tools at gmail dot com
@ 2020-10-16 23:54 ` hjl.tools at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: hjl.tools at gmail dot com @ 2020-10-16 23:54 UTC (permalink / raw)
  To: glibc-bugs

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                        |2.33
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed in 2.33 by

commit 0f09154c64005e78b61484ae87b5ea2028051ea0
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jul 4 06:35:49 2020 -0700

    x86: Initialize CPU info via IFUNC relocation [BZ 26203]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-16 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 12:32 [Bug libc/26203] New: GLRO(dl_x86_cpu_features) may not be intialized hjl.tools at gmail dot com
2020-07-04 15:23 ` [Bug libc/26203] " hjl.tools at gmail dot com
2020-10-16 23:54 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).