mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-30 12:20:06 +08:00
Fix testcase 114 for macos
lib/bt-exe.c: - call __bound_init before sigset_exception_handler because sigaction is redirected. tests/tests2/Makefile: - run testcase 114 on macos again
This commit is contained in:
parent
13c66526ed
commit
757a97466f
@ -18,6 +18,9 @@ void __bt_init(rt_context *p, int num_callers, int mode)
|
|||||||
__attribute__((weak)) void __bound_init(void*, int);
|
__attribute__((weak)) void __bound_init(void*, int);
|
||||||
struct rt_context *rc = &g_rtctxt;
|
struct rt_context *rc = &g_rtctxt;
|
||||||
//fprintf(stderr, "__bt_init %d %p %p %d\n", num_callers, p->stab_sym, p->bounds_start, mode), fflush(stderr);
|
//fprintf(stderr, "__bt_init %d %p %p %d\n", num_callers, p->stab_sym, p->bounds_start, mode), fflush(stderr);
|
||||||
|
/* call __bound_init here due to redirection of sigaction */
|
||||||
|
if (__bound_init && p->bounds_start)
|
||||||
|
__bound_init(p->bounds_start, mode);
|
||||||
if (num_callers) {
|
if (num_callers) {
|
||||||
memcpy(rc, p, offsetof(rt_context, next));
|
memcpy(rc, p, offsetof(rt_context, next));
|
||||||
rc->num_callers = num_callers - 1;
|
rc->num_callers = num_callers - 1;
|
||||||
@ -27,8 +30,6 @@ void __bt_init(rt_context *p, int num_callers, int mode)
|
|||||||
} else {
|
} else {
|
||||||
p->next = rc->next, rc->next = p;
|
p->next = rc->next, rc->next = p;
|
||||||
}
|
}
|
||||||
if (__bound_init && p->bounds_start)
|
|
||||||
__bound_init(p->bounds_start, mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy a string and truncate it. */
|
/* copy a string and truncate it. */
|
||||||
|
@ -93,10 +93,8 @@ GEN-ALWAYS =
|
|||||||
$(TCC) -bt $1 a1$(DLLSUF) a2$(DLLSUF) -Wl,-rpath=. -o a.exe && \
|
$(TCC) -bt $1 a1$(DLLSUF) a2$(DLLSUF) -Wl,-rpath=. -o a.exe && \
|
||||||
./a.exe
|
./a.exe
|
||||||
|
|
||||||
ifndef CONFIG_OSX
|
|
||||||
114_bound_signal.test: FLAGS += -b
|
114_bound_signal.test: FLAGS += -b
|
||||||
114_bound_signal.test: NORUN = true # tcc -run does not support fork and -b and SELINUX
|
114_bound_signal.test: NORUN = true # tcc -run does not support fork and -b and SELINUX
|
||||||
endif
|
|
||||||
115_bound_setjmp.test: FLAGS += -b
|
115_bound_setjmp.test: FLAGS += -b
|
||||||
116_bound_setjmp2.test: FLAGS += -b
|
116_bound_setjmp2.test: FLAGS += -b
|
||||||
117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )
|
117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )
|
||||||
|
Loading…
Reference in New Issue
Block a user