[PATCH] D73976: [compiler-rt] fix NetBSD build with sigaltstack interception
Igor Sugak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 10:03:11 PST 2020
sugak created this revision.
sugak added reviewers: mgorny, krytarowski.
Herald added subscribers: llvm-commits, Sanitizers, dberris.
Herald added projects: Sanitizers, LLVM.
sugak edited the summary of this revision.
sugak added a comment.
Hi @mgorny and @krytarowski! This is my best effort fixing build errors caused by D73816 <https://reviews.llvm.org/D73816>. I don't have a good way to build and test it on NetBSD and would need your help with this.
`sigaltstack` interception is implemented D73816 <https://reviews.llvm.org/D73816>. This updated NetBSD bits to fix the build errors.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73976
Files:
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
Index: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
@@ -48,6 +48,7 @@
extern unsigned struct_tms_sz;
extern unsigned struct_itimerspec_sz;
extern unsigned struct_sigevent_sz;
+extern unsigned struct_stack_t_sz;
extern unsigned struct_sched_param_sz;
extern unsigned struct_statfs_sz;
extern unsigned struct_sockaddr_sz;
Index: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp
@@ -269,6 +269,7 @@
unsigned struct_group_sz = sizeof(struct group);
unsigned siginfo_t_sz = sizeof(siginfo_t);
unsigned struct_sigaction_sz = sizeof(struct sigaction);
+unsigned struct_stack_t_sz = sizeof(stack_t);
unsigned struct_itimerval_sz = sizeof(struct itimerval);
unsigned pthread_t_sz = sizeof(pthread_t);
unsigned pthread_mutex_t_sz = sizeof(pthread_mutex_t);
Index: compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -113,6 +113,7 @@
#define setitimer __setitimer50
#define setlocale __setlocale50
#define shmctl __shmctl50
+#define sigaltstack __sigaltstack14
#define sigemptyset __sigemptyset14
#define sigfillset __sigfillset14
#define sigpending __sigpending14
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73976.242364.patch
Type: text/x-patch
Size: 1772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200204/680f4d0d/attachment.bin>
More information about the llvm-commits
mailing list