We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original bug ID: 6530 Reporter: madroach Assigned to: @damiendoligez Status: closed (set by @damiendoligez on 2014-10-02T11:22:09Z) Resolution: fixed Priority: normal Severity: tweak Platform: amd64, i386 OS: OpenBSD Version: 4.02.0+beta1 / +rc1 Target version: 4.02.1+dev Fixed in version: 4.02.1+dev Category: runtime system and C interface Tags: patch Monitored by: @gasche
Below you find the #defines for OpenBSD i386 and amd64 stack overflow handling.
/****************** AMD64, OpenBSD */
#elif defined(TARGET_amd64) && defined (SYS_openbsd)
#define DECLARE_SIGNAL_HANDLER(name) static void name(int sig, siginfo_t * info, struct sigcontext * context)
#define SET_SIGACT(sigact,name) sigact.sa_sigaction = (void (*)(int,siginfo_t *,void *)) (name); sigact.sa_flags = SA_SIGINFO
#define CONTEXT_PC (context->sc_rip) #define CONTEXT_EXCEPTION_POINTER (context->sc_r14) #define CONTEXT_YOUNG_PTR (context->sc_r15) #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
/****************** I386, BSD_ELF */
#elif defined(TARGET_i386) && defined(SYS_bsd_elf)
#define CONTEXT_PC (context->sc_eip) #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
The configure script needs to be amended, too:
@@ -1324,7 +1326,8 @@ fi
case "$arch,$system" in
The text was updated successfully, but these errors were encountered:
Comment author: madroach
here the patch against signals_osdep.h:
--- asmrun/signals_osdep.h.orig Tue May 13 15:20:48 2014 +++ asmrun/signals_osdep.h Sun Aug 31 20:22:33 2014 @@ -130,6 +130,22 @@ #define CONTEXT_YOUNG_PTR (context->uc_mcontext.gregs[REG_R15]) #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
+/****************** AMD64, OpenBSD */ + +#elif defined(TARGET_amd64) && defined (SYS_openbsd) +
/****************** I386, Linux */
#elif defined(TARGET_i386) && defined(SYS_linux_elf) @@ -142,6 +158,20 @@ sigact.sa_flags = 0
#define CONTEXT_FAULTING_ADDRESS ((char ) context.cr2) + +/***************** I386, BSD_ELF */ + +#elif defined(TARGET_i386) && defined(SYS_bsd_elf) +
/****************** I386, BSD */
Sorry, something went wrong.
Comment author: @damiendoligez
I've applied the patches (rev 15363). I'll close the PR if the CI reports no problems (it tests with OpenBSD i386).
damiendoligez
No branches or pull requests
Original bug ID: 6530
Reporter: madroach
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2014-10-02T11:22:09Z)
Resolution: fixed
Priority: normal
Severity: tweak
Platform: amd64, i386
OS: OpenBSD
Version: 4.02.0+beta1 / +rc1
Target version: 4.02.1+dev
Fixed in version: 4.02.1+dev
Category: runtime system and C interface
Tags: patch
Monitored by: @gasche
Bug description
Below you find the #defines for OpenBSD i386 and amd64 stack overflow handling.
Additional information
/****************** AMD64, OpenBSD */
#elif defined(TARGET_amd64) && defined (SYS_openbsd)
#define DECLARE_SIGNAL_HANDLER(name)
static void name(int sig, siginfo_t * info, struct sigcontext * context)
#define SET_SIGACT(sigact,name)
sigact.sa_sigaction = (void (*)(int,siginfo_t *,void *)) (name);
sigact.sa_flags = SA_SIGINFO
#define CONTEXT_PC (context->sc_rip)
#define CONTEXT_EXCEPTION_POINTER (context->sc_r14)
#define CONTEXT_YOUNG_PTR (context->sc_r15)
#define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
/****************** I386, BSD_ELF */
#elif defined(TARGET_i386) && defined(SYS_bsd_elf)
#define DECLARE_SIGNAL_HANDLER(name)
static void name(int sig, siginfo_t * info, struct sigcontext * context)
#define SET_SIGACT(sigact,name)
sigact.sa_sigaction = (void (*)(int,siginfo_t *,void *)) (name);
sigact.sa_flags = SA_SIGINFO
#define CONTEXT_PC (context->sc_eip)
#define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
The configure script needs to be amended, too:
@@ -1324,7 +1326,8 @@ fi
Determine if system stack overflows can be detected
case "$arch,$system" in
inf "System stack overflow can be detected."
echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h;;
*)
The text was updated successfully, but these errors were encountered: