|
From: Paul F. <pa...@so...> - 2026-03-18 20:07:47
|
https://sourceware.org/cgit/valgrind/commit/?id=4958303b830b87967a5378c833899470ec76688c commit 4958303b830b87967a5378c833899470ec76688c Author: Paul Floyd <pj...@wa...> Date: Wed Mar 18 20:51:42 2026 +0100 Bug 517697 - Implement CLRSSONSTACK and SETUJMPBUF handling on Solaris. Patch provided by Casper H. S. Dik. Thanks! Diff: --- NEWS | 1 + coregrind/m_syswrap/syswrap-solaris.c | 12 ++++++++++++ include/vki/vki-solaris.h | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/NEWS b/NEWS index aa7080b967..3f059769ee 100644 --- a/NEWS +++ b/NEWS @@ -110,6 +110,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 516289 illumos lsframe2 regtest fails 516748 Incorrect use of SET_STATUS_Failure for syscall wrappers that return error codes rather than -1 on error +517697 Implement CLRSSONSTACK and SETUJMPBUF handling on Solaris. To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index a2ab87ac02..6ecd3a4c44 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -5031,6 +5031,18 @@ PRE(sys_getsetcontext) SET_STATUS_Success(0); } break; +#ifdef VKI_CLRSSONSTACK + case VKI_CLRSSONSTACK: + /* Libc: int clrssonstack(void); */ + SET_STATUS_Success(0); + break; +#endif +#ifdef VKI_SETUJMPBUF + case VKI_SETUJMPBUF: + /* Libc: int setujmpbuf(void *buf, void *func); */ + SET_STATUS_Success(0); + break; +#endif default: VG_(unimplemented)("Syswrap of the context call with flag %ld.", SARG1); /*NOTREACHED*/ diff --git a/include/vki/vki-solaris.h b/include/vki/vki-solaris.h index 13c43a9795..d6e00cdc6d 100644 --- a/include/vki/vki-solaris.h +++ b/include/vki/vki-solaris.h @@ -1529,6 +1529,14 @@ struct sysv_ucontext { #define VKI_SETCONTEXT SETCONTEXT #define VKI_GETUSTACK GETUSTACK #define VKI_SETUSTACK SETUSTACK +#ifdef CLRSSONSTACK +/* New in Oracle Solaris 11.4 SRU 30 */ +#define VKI_CLRSSONSTACK CLRSSONSTACK +#endif +#ifdef SETUJMPBUF +/* New in Oracle Solaris 11.4 SRU 81 */ +#define VKI_SETUJMPBUF SETUJMPBUF +#endif #define VKI_UC_SIGMASK UC_SIGMASK #define VKI_UC_STACK UC_STACK |