[build] add convenience script for ASan builds
Sometimes when ASan support is wanted for fwknop, the following compile error can be generated. This script provides a means to solve this. fwknop-spa_comm.o: In function `send_spa_packet_http': /home/mbr/git/fwknop.git/client/spa_comm.c:516: undefined reference to `rpl_malloc' ../lib/.libs/libfko.so: undefined reference to `rpl_realloc'
This commit is contained in:
parent
5e0a668a7f
commit
47ff151dea
@ -74,6 +74,7 @@ EXTRA_DIST = \
|
|||||||
extras/ramdisk/ramdisk-create.sh \
|
extras/ramdisk/ramdisk-create.sh \
|
||||||
extras/ramdisk/ramdisk-create-osx.sh \
|
extras/ramdisk/ramdisk-create-osx.sh \
|
||||||
extras/console-qr/console-qr.sh \
|
extras/console-qr/console-qr.sh \
|
||||||
|
extras/sanitizer/asan-build.sh \
|
||||||
fwknop.spec \
|
fwknop.spec \
|
||||||
iphone/main.m \
|
iphone/main.m \
|
||||||
iphone/Fwknop.xcodeproj \
|
iphone/Fwknop.xcodeproj \
|
||||||
|
|||||||
21
extras/sanitizer/asan-build.sh
Executable file
21
extras/sanitizer/asan-build.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh -x
|
||||||
|
|
||||||
|
#
|
||||||
|
# In some cases when enabling Google's Address Sanitizer, errors like the
|
||||||
|
# following can be generated. This script provides a workaround.
|
||||||
|
#
|
||||||
|
# fwknop-spa_comm.o: In function `send_spa_packet_http':
|
||||||
|
# /home/mbr/git/fwknop.git/client/spa_comm.c:516: undefined reference to `rpl_malloc'
|
||||||
|
# ../lib/.libs/libfko.so: undefined reference to `rpl_realloc'
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -x ./configure ]; then
|
||||||
|
export ac_cv_func_malloc_0_nonnull=yes
|
||||||
|
export ac_cv_func_realloc_0_nonnull=yes
|
||||||
|
./autogen.sh
|
||||||
|
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/run --enable-asan-support $@
|
||||||
|
make clean
|
||||||
|
make
|
||||||
|
else
|
||||||
|
echo "[*] Execute from the fwknop top level sources directory"
|
||||||
|
fi
|
||||||
Loading…
x
Reference in New Issue
Block a user