[PATCH] Add FreeBSD 9.2 support to asan_linux.cc
Viktor Kutuzov
vkutuzov at accesssoftek.com
Tue Mar 11 05:55:17 PDT 2014
Hi kcc, samsonov,
Segregated from D3031:
http://llvm-reviews.chandlerc.com/D3031
http://llvm-reviews.chandlerc.com/D3039
Files:
lib/asan/asan_linux.cc
Index: lib/asan/asan_linux.cc
===================================================================
--- lib/asan/asan_linux.cc
+++ lib/asan/asan_linux.cc
@@ -39,6 +39,17 @@
#include <sys/ucontext.h>
#endif
+// x86_64 FreeBSD 9.2 and older define 64-bit register names in both 64-bit
+// and 32-bit modes.
+#if SANITIZER_FREEBSD
+#include <sys/param.h>
+# if __FreeBSD_version <= 902001 // v9.2
+# define mc_eip mc_rip
+# define mc_ebp mc_rbp
+# define mc_esp mc_rsp
+# endif
+#endif
+
extern "C" void* _DYNAMIC;
namespace __asan {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3039.1.patch
Type: text/x-patch
Size: 538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140311/87357d5a/attachment.bin>
More information about the llvm-commits
mailing list