Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc/lib/liblsan Add lsan support.
details: https://anonhg.NetBSD.org/src/rev/051b27adcae1
branches: trunk
changeset: 320214:051b27adcae1
user: christos <christos%NetBSD.org@localhost>
date: Tue Jun 26 20:54:32 2018 +0000
description:
Add lsan support.
diffstat:
external/gpl3/gcc/lib/liblsan/Makefile | 25 +++++++++++++++++++++++++
external/gpl3/gcc/lib/liblsan/shlib_version | 2 ++
external/gpl3/gcc/lib/liblsan/test-lsan.c | 13 +++++++++++++
3 files changed, 40 insertions(+), 0 deletions(-)
diffs (52 lines):
diff -r 89b7c4e13f49 -r 051b27adcae1 external/gpl3/gcc/lib/liblsan/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/liblsan/Makefile Tue Jun 26 20:54:32 2018 +0000
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1 2018/06/26 20:54:32 christos Exp $
+
+.include <bsd.own.mk>
+
+.include "../Makefile.inc"
+.include "../Makefile.sanitizer"
+
+.PATH: ${SANITIZER}/lsan ${SANITIZER}/asan
+
+LSAN_SRCS+= \
+sanitizer_stoptheworld_linux_libcdep.cc \
+lsan.cc \
+lsan_allocator.cc \
+lsan_common.cc \
+lsan_common_linux.cc \
+lsan_interceptors.cc \
+lsan_preinit.cc \
+lsan_thread.cc
+
+
+LIB= lsan
+SRCS+= ${LSAN_SRCS}
+LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt
+
+.include <bsd.lib.mk>
diff -r 89b7c4e13f49 -r 051b27adcae1 external/gpl3/gcc/lib/liblsan/shlib_version
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/liblsan/shlib_version Tue Jun 26 20:54:32 2018 +0000
@@ -0,0 +1,2 @@
+major=1
+minor=0
diff -r 89b7c4e13f49 -r 051b27adcae1 external/gpl3/gcc/lib/liblsan/test-lsan.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/liblsan/test-lsan.c Tue Jun 26 20:54:32 2018 +0000
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(void)
+{
+ int *a = malloc(7);
+
+ for (int i = 0; i < 10; i++)
+ a[i] = i;
+ printf("%d\n", a[6]);
+ return 0;
+}
Home |
Main Index |
Thread Index |
Old Index