public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
@ 2020-06-18  7:09 ` onitake at gmail dot com
  2020-06-18  7:45 ` schwab@linux-m68k.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: onitake at gmail dot com @ 2020-06-18  7:09 UTC (permalink / raw)
  To: glibc-bugs

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

Gregor Riepl <onitake at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |onitake at gmail dot com

--- Comment #1 from Gregor Riepl <onitake at gmail dot com> ---
Please correct me if I'm wrong, but there is no getcontext syscall in Linux.
This is a library function provided by libc:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S;h=45572d77b2271099169a8a808e183069f57a318b;hb=HEAD

If there is a mismatch between the data structures used by sigsetjmp and
getcontext, then this is an internal inconsistency in the libc.

The implementation for sparc32 is here:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S;h=5e92bec8150ab3aea9da8c555e95c4c53d45e677;hb=HEAD

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
  2020-06-18  7:09 ` [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch onitake at gmail dot com
@ 2020-06-18  7:45 ` schwab@linux-m68k.org
  2020-06-18  9:48 ` glaubitz at physik dot fu-berlin.de
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2020-06-18  7:45 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
See sparc64_get_context.

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
  2020-06-18  7:09 ` [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch onitake at gmail dot com
  2020-06-18  7:45 ` schwab@linux-m68k.org
@ 2020-06-18  9:48 ` glaubitz at physik dot fu-berlin.de
  2020-06-18  9:49 ` glaubitz at physik dot fu-berlin.de
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-06-18  9:48 UTC (permalink / raw)
  To: glibc-bugs

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

John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg,
                   |                            |glaubitz at physik dot fu-berlin.d
                   |                            |e, matorola at gmail dot com

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-06-18  9:48 ` glaubitz at physik dot fu-berlin.de
@ 2020-06-18  9:49 ` glaubitz at physik dot fu-berlin.de
  2020-06-18  9:52 ` glaubitz at physik dot fu-berlin.de
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-06-18  9:49 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Andreas Schwab from comment #2)
> See sparc64_get_context.

Is there a sparc32-equivalent to that?

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-06-18  9:49 ` glaubitz at physik dot fu-berlin.de
@ 2020-06-18  9:52 ` glaubitz at physik dot fu-berlin.de
  2020-06-18 11:35 ` glaubitz at physik dot fu-berlin.de
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-06-18  9:52 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
glibc has:

> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sparc32/getcontext.S;h=5e92bec8150ab3aea9da8c555e95c4c53d45e677;hb=HEAD

> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sparc64/getcontext.S;h=45572d77b2271099169a8a808e183069f57a318b;hb=HEAD

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-06-18  9:52 ` glaubitz at physik dot fu-berlin.de
@ 2020-06-18 11:35 ` glaubitz at physik dot fu-berlin.de
  2020-06-18 11:40 ` glaubitz at physik dot fu-berlin.de
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-06-18 11:35 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
@Thorsten:

Your patch is incomplete, it currently breaks the build:

include ../include/libc-symbols.h       -DTOP_NAMESPACE=glibc
-DGEN_AS_CONST_HEADERS \
                   -MD -MP -MF /home/glaubitz/glibc/build/tcb-offsets.h.dT \
                   -MT '/home/glaubitz/glibc/build/tcb-offsets.h.d
/home/glaubitz/glibc/build/tcb-offsets.h'" \
          ../sysdeps/sparc/nptl/tcb-offsets.sym >
/home/glaubitz/glibc/build/tcb-offsets.hT
In file included from ../nptl/descr.h:24,
                 from ../sysdeps/sparc/nptl/tls.h:81,
                 from ../include/errno.h:25,
                 from ../sysdeps/unix/sysv/linux/sysdep.h:23,
                 from ../sysdeps/unix/sysv/linux/sparc/sysdep.h:23,
                 from ../sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h:22,
                 from <stdin>:1:
../include/setjmp.h:42:3: error: static assertion failed: "size of jmp_buf !=
640"
   42 |   _Static_assert (sizeof (type) == size, \
      |   ^~~~~~~~~~~~~~
../include/setjmp.h:55:1: note: in expansion of macro ‘TEST_SIZE’
   55 | TEST_SIZE (jmp_buf, JMP_BUF_SIZE);
      | ^~~~~~~~~
../include/setjmp.h:42:3: error: static assertion failed: "size of sigjmp_buf
!= 640"
   42 |   _Static_assert (sizeof (type) == size, \
      |   ^~~~~~~~~~~~~~
../include/setjmp.h:56:1: note: in expansion of macro ‘TEST_SIZE’
   56 | TEST_SIZE (sigjmp_buf, SIGJMP_BUF_SIZE);
      | ^~~~~~~~~
../include/setjmp.h:50:3: error: static assertion failed: "offset of
__mask_was_saved field of struct __jmp_buf_tag != 496"
   50 |   _Static_assert (offsetof (type, member) == offset, \
      |   ^~~~~~~~~~~~~~
../include/setjmp.h:63:1: note: in expansion of macro ‘TEST_OFFSET’
   63 | TEST_OFFSET (struct __jmp_buf_tag, __mask_was_saved,
      | ^~~~~~~~~~~
../include/setjmp.h:50:3: error: static assertion failed: "offset of
__saved_mask field of struct __jmp_buf_tag != 504"
   50 |   _Static_assert (offsetof (type, member) == offset, \
      |   ^~~~~~~~~~~~~~
../include/setjmp.h:65:1: note: in expansion of macro ‘TEST_OFFSET’
   65 | TEST_OFFSET (struct __jmp_buf_tag, __saved_mask,
      | ^~~~~~~~~~~

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-06-18 11:35 ` glaubitz at physik dot fu-berlin.de
@ 2020-06-18 11:40 ` glaubitz at physik dot fu-berlin.de
  2020-06-18 12:04 ` schwab@linux-m68k.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-06-18 11:40 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #6 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
Looks like you need to adjust the values in
sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h.

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-06-18 11:40 ` glaubitz at physik dot fu-berlin.de
@ 2020-06-18 12:04 ` schwab@linux-m68k.org
  2020-06-18 14:51 ` tg at mirbsd dot de
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2020-06-18 12:04 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #7 from Andreas Schwab <schwab@linux-m68k.org> ---
That would of course be an ABI break.

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2020-06-18 12:04 ` schwab@linux-m68k.org
@ 2020-06-18 14:51 ` tg at mirbsd dot de
  2020-06-18 15:50 ` schwab@linux-m68k.org
  2020-06-18 15:57 ` glaubitz at physik dot fu-berlin.de
  10 siblings, 0 replies; 11+ messages in thread
From: tg at mirbsd dot de @ 2020-06-18 14:51 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #8 from Thorsten Glaser <tg at mirbsd dot de> ---
Sorry, like I said, that was a patch against µClibc-ng which shares this header
and some of the related code with glibc, it was never intended to directly
apply to glibc alone, I just noticed that (IIRC) the size of the jump buffer
(if I misremember, then definitely the offset of the __mask_was_saved member)
was off.

I put it here so people knowledgeable about glibc can have a look at the change
and see whether something related is needed in glibc.

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2020-06-18 14:51 ` tg at mirbsd dot de
@ 2020-06-18 15:50 ` schwab@linux-m68k.org
  2020-06-18 15:57 ` glaubitz at physik dot fu-berlin.de
  10 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2020-06-18 15:50 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com

--- Comment #9 from Andreas Schwab <schwab@linux-m68k.org> ---
It seems like this has been broken "forever", see commit a1303dc8dc.

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

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

* [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch
       [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2020-06-18 15:50 ` schwab@linux-m68k.org
@ 2020-06-18 15:57 ` glaubitz at physik dot fu-berlin.de
  10 siblings, 0 replies; 11+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2020-06-18 15:57 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #10 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
FWIW, I have tested Thorsten's patch on gcc202, with the necessary changes to
the constants I mentioned. It does build fine after but the testsuite results
don't improve (one more test is marked as "UNSUPPORTED" though).

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

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

end of thread, other threads:[~2020-06-18 15:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25093-131@http.sourceware.org/bugzilla/>
2020-06-18  7:09 ` [Bug libc/25093] sparc64 sigsetjmp buffer size mismatch onitake at gmail dot com
2020-06-18  7:45 ` schwab@linux-m68k.org
2020-06-18  9:48 ` glaubitz at physik dot fu-berlin.de
2020-06-18  9:49 ` glaubitz at physik dot fu-berlin.de
2020-06-18  9:52 ` glaubitz at physik dot fu-berlin.de
2020-06-18 11:35 ` glaubitz at physik dot fu-berlin.de
2020-06-18 11:40 ` glaubitz at physik dot fu-berlin.de
2020-06-18 12:04 ` schwab@linux-m68k.org
2020-06-18 14:51 ` tg at mirbsd dot de
2020-06-18 15:50 ` schwab@linux-m68k.org
2020-06-18 15:57 ` glaubitz at physik dot fu-berlin.de

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).