public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/31184] New: FAIL: elf/tst-tlsgap
@ 2023-12-21  0:16 hjl.tools at gmail dot com
  2023-12-22 13:37 ` [Bug dynamic-link/31184] " cvs-commit at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2023-12-21  0:16 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31184
           Summary: FAIL: elf/tst-tlsgap
           Product: glibc
           Version: 2.38
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x32

On x32, I got

FAIL: elf/tst-tlsgap

open tst-tlsgap-mod1.so

Thread 2 "tst-tlsgap" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 2268754]
_dl_tlsdesc_dynamic () at ../sysdeps/x86_64/dl-tlsdesc.S:108
108             movq    (%rsi), %rax
(gdb) p/x $rsi
$4 = 0xf7dbf9005655fb18
(gdb) 

The problem is at

_dl_tlsdesc_dynamic:
        _CET_ENDBR
        /* Preserve call-clobbered registers that we modify.
           We need two scratch regs anyway.  */
        movq    %rsi, -16(%rsp)
        movq    %fs:DTV_OFFSET, %rsi
        movq    %rdi, -8(%rsp)
        movq    TLSDESC_ARG(%rax), %rdi
        movq    (%rsi), %rax
        cmpq    %rax, TLSDESC_GEN_COUNT(%rdi)
        ja      .Lslow
        movq    TLSDESC_MODID(%rdi), %rax
        salq    $4, %rax
        movq    (%rax,%rsi), %rax
        cmpq    $-1, %rax
        je      .Lslow
        addq    TLSDESC_MODOFF(%rdi), %rax
.Lret:
        movq    -16(%rsp), %rsi
        subq    %fs:0, %rax
        movq    -8(%rsp), %rdi
        ret

since the dtv field is a pointer, %fs:DTV_OFFSET is a 32-bit
location, not 64-bit.

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

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

end of thread, other threads:[~2023-12-23 17:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21  0:16 [Bug dynamic-link/31184] New: FAIL: elf/tst-tlsgap hjl.tools at gmail dot com
2023-12-22 13:37 ` [Bug dynamic-link/31184] " cvs-commit at gcc dot gnu.org
2023-12-22 14:44 ` sam at gentoo dot org
2023-12-23 15:08 ` cvs-commit at gcc dot gnu.org
2023-12-23 17:00 ` cvs-commit at gcc dot gnu.org
2023-12-23 17:35 ` cvs-commit at gcc dot gnu.org
2023-12-23 17:36 ` cvs-commit at gcc dot gnu.org
2023-12-23 17:38 ` cvs-commit at gcc dot gnu.org
2023-12-23 17:40 ` 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).