-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
I patched hat-trie-master/configure.ac to enable gcc address sanitiser:
cat > hat-trie-master.patch << 'EOF'
--- hat-trie-master/configure.ac 2018-12-06 11:36:58.000000000 +1100
+++ hat-trie-master-new/configure.ac 2022-11-12 22:28:50.565755292 +1100
@@ -6,7 +6,8 @@
base_CFLAGS="-std=gnu99 -Wall -Wextra -pedantic"
opt_CFLAGS="${base_CFLAGS} -O3"
-dbg_CFLAGS="${base_CFLAGS} -g -O0"
+dbg_CFLAGS="${base_CFLAGS} -ggdb3 -O0 -ggdb3 -fsanitize=undefined -fsanitize=address -fno-sanitize=vptr -fno-omit-frame-pointer"
+
AC_ARG_ENABLE([debugging],
[AS_HELP_STRING([--enable-debugging],
EOF
unzip hat-trie-master.zip
cd hat-trie-master
patch -p1 < ../hat-trie-master.patch
export LDFLAGS="-ggdb3 -O0 -ggdb3 -fsanitize=undefined -fsanitize=address \
-fno-sanitize=vptr -fno-omit-frame-pointer"
autoreconf -i
./configure --enable-debugging
make
cd test
make check_hattrie
./check_hattrie > check_hattrie.log 2>&1
check_hattrie.log shows address alignment warnings:
check_hattrie.log
Running valgrind ./check_hattrie on a release build shows no errors or warnings.
I am running Fedora-36 6.0.7-200.fc36.x86_64 GNU/Linux
and gcc version 12.2.1 20220819 (Red Hat 12.2.1-2) (GCC)
Metadata
Metadata
Assignees
Labels
No labels