public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc
@ 2022-09-02 8:44 sumbera at volny dot cz
2024-04-02 13:19 ` [Bug go/106813] " ro at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: sumbera at volny dot cz @ 2022-09-02 8:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813
Bug ID: 106813
Summary: getSiginfo() libgo/runtime/go-signal.c missing Solaris
specific code to get ret.sigpc
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: sumbera at volny dot cz
Target Milestone: ---
Created attachment 53531
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53531&action=edit
Proposed patch file.
getSiginfo() in libgo/runtime/go-signal.c is missing Solaris specific code to
get ret.sigpc and thus it calls runtime_callers().
It was observed that sometimes call to runtime_callers() ends with segmentation
fault (because sparc64_is_sighandler() gets wrong pc - e.g. 0x8):
ffffffff7ac13fe1 libgcc_s.so.1`uw_frame_state_for+0x434(ffffffff7ac14950,
ffffffff7ac14d40,
ffffffff6ab59e50, ffffffff6ab66a8d, 0, ffffffff6ab66a8d)
ffffffff7ac140a1 libgcc_s.so.1`_Unwind_Backtrace+0x54(ffffffff6a9ce33c,
ffffffff7ac154d0, 0,
ffffffff7ac14d40, ffffffff7ac14950, 0)
ffffffff7ac14c21 libgo.so.14`backtrace_full+0x70(ffffffff7f5c8000, 1,
ffffffff6a4c1790,
ffffffff6a4c1abc, ffffffff7ac155b8, ffffffff6b09d3b8)
ffffffff7ac14d01 libgo.so.14`runtime_callers+0x78(6, ffffffff7ac156a0,
ffffffff7f5c8000, 0,
ffffffff6a4c1abc, ffffffff6b0c7d7c)
ffffffff7ac14dd1 libgo.so.14`runtime.getSiginfo+0x1c(ffffffff7ac15ef0,
ffffffff7ac15c10, 0, 0, 0,
61e000000000)
ffffffff7ac14ed1 libgo.so.14`runtime.sigtrampgo+0x39c(12, ffffffff7ac15ef0,
ffffffff7ac15c10,
ffffffff6ad81b88, 36, c0010c6800)
ffffffff7ac15101 libc.so.1`__sighndlr+0xc(12, ffffffff7ac15ef0,
ffffffff7ac15c10,
ffffffff6a4c2ebc, 0, ffffffff7ed24000)
ffffffff7ac151b1 libc.so.1`call_user_handler+0x404(d, ffffffff7ac15ef0,
ffbffeff, 0, 12, ff)
ffffffff7ac152a1 libc.so.1`sigacthandler+0xe0(12, ffffffff7ac15ef0,
ffffffff7ac15c10, 0, 0,
ffffffff7ed24000)
ffffffff21bff741 libgo.so.14`runtime.kickoff(0, 0, 0, 0, 0, 0)
This can be avoided by setting ret.sigpc via platform specific code as it's
done on other systems. See attached patch file.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/106813] getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc
2022-09-02 8:44 [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc sumbera at volny dot cz
@ 2024-04-02 13:19 ` ro at gcc dot gnu.org
2024-04-02 13:20 ` ro at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2024-04-02 13:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ro at gcc dot gnu.org
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
FWIW I had a similar patch in my local tree for years, but neglected to submit
it (among others because it lacked dumpregs support.
While going over the remaining go.test failures recently, I noted some that
might be related, so I completed the patch (attached). A few notes:
* I've used the customary __sun__ && __svr4__ guard for Solaris-specific code,
not __sun && __SVR4 which is only used in runtime/go-libmain.c.
* I've reused the Linux/x86_64 code in dumpregs for Solaris. Only a few
adjustments were necessary, but this still seemed better than replicating
the whole section.
* I've added SPARC support, too. Since gregs[] is almost identical between
32 and 64-bit, I've just used different formats for printing 32 and 64-bit
registers, again to avoid massive duplication.
* When testing on Debian/sparc64, the 64-bit version there reguired an ugly
variation: the general-purpose member of mcontext_t is called mc_gregs
instead of gregs, and the indices are named MC_* instead of REG_* (although
the names are identical with one exception). I have no idea what rid them
to do this, but at least my code does compile and run there.
The patch has been tested on i386-pc-solaris2.11, sparc-sun-solaris2.11,
x86_64-pc-linux-gnu, and sparc64-unknown-linux-gnu (32 and 64-bit each).
There were no regressions, but compared to a vanilla tree there where no new
PASSes either.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/106813] getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc
2022-09-02 8:44 [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc sumbera at volny dot cz
2024-04-02 13:19 ` [Bug go/106813] " ro at gcc dot gnu.org
@ 2024-04-02 13:20 ` ro at gcc dot gnu.org
2024-04-06 12:25 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2024-04-02 13:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813
--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 57848
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57848&action=edit
Alternative patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/106813] getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc
2022-09-02 8:44 [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc sumbera at volny dot cz
2024-04-02 13:19 ` [Bug go/106813] " ro at gcc dot gnu.org
2024-04-02 13:20 ` ro at gcc dot gnu.org
@ 2024-04-06 12:25 ` ebotcazou at gcc dot gnu.org
2024-04-29 18:40 ` cvs-commit at gcc dot gnu.org
2024-04-29 18:41 ` ian at airs dot com
4 siblings, 0 replies; 6+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-04-06 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2024-04-06
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/106813] getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc
2022-09-02 8:44 [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc sumbera at volny dot cz
` (2 preceding siblings ...)
2024-04-06 12:25 ` ebotcazou at gcc dot gnu.org
@ 2024-04-29 18:40 ` cvs-commit at gcc dot gnu.org
2024-04-29 18:41 ` ian at airs dot com
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-29 18:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Ian Lance Taylor <ian@gcc.gnu.org>:
https://gcc.gnu.org/g:a05efc8bf5ed329ea7d9b1740c326bdc6b04e37a
commit r15-53-ga05efc8bf5ed329ea7d9b1740c326bdc6b04e37a
Author: Ian Lance Taylor <iant@golang.org>
Date: Sun Apr 28 13:30:39 2024 -0700
runtime: dump registers on Solaris
Patch by Rainer Orth <ro@gcc.gnu.org>.
Fixes PR go/106813
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/581724
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug go/106813] getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc
2022-09-02 8:44 [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc sumbera at volny dot cz
` (3 preceding siblings ...)
2024-04-29 18:40 ` cvs-commit at gcc dot gnu.org
@ 2024-04-29 18:41 ` ian at airs dot com
4 siblings, 0 replies; 6+ messages in thread
From: ian at airs dot com @ 2024-04-29 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106813
Ian Lance Taylor <ian at airs dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from Ian Lance Taylor <ian at airs dot com> ---
Thanks. Patch committed. This should be fixed now.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-29 18:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 8:44 [Bug go/106813] New: getSiginfo() libgo/runtime/go-signal.c missing Solaris specific code to get ret.sigpc sumbera at volny dot cz
2024-04-02 13:19 ` [Bug go/106813] " ro at gcc dot gnu.org
2024-04-02 13:20 ` ro at gcc dot gnu.org
2024-04-06 12:25 ` ebotcazou at gcc dot gnu.org
2024-04-29 18:40 ` cvs-commit at gcc dot gnu.org
2024-04-29 18:41 ` ian at airs 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).