File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 26
26
-DENABLE_STATIC=ON \
27
27
-B build-msan
28
28
cmake --build build-msan
29
+
30
+ fuzz_asan :
31
+ name : fuzz with AddressSanitizer
32
+ runs-on : ubuntu-latest
33
+ container : ubuntu:23.04
34
+
35
+ steps :
36
+
37
+ - name : install dependencies from package management
38
+ env :
39
+ DEBIAN_FRONTEND : noninteractive
40
+ run : |
41
+ apt -q -y update
42
+ apt -q -y install \
43
+ llvm-16 clang-16 lld-16 \
44
+ build-essential cmake ninja-build pkg-config \
45
+ libssl-dev libedit-dev libcurl4-openssl-dev libusb-1.0-0-dev libpcsclite-dev gengetopt
46
+
47
+ - name : clone the Yubico/yubihsm-shell repository
48
+ uses : actions/checkout@v3
49
+ with :
50
+ path : yubihsm-shell
51
+
52
+ - name : do build
53
+ env :
54
+ CC : clang-16
55
+ CXX : clang++-16
56
+ working-directory : yubihsm-shell
57
+ run : |
58
+ cmake \
59
+ -DFUZZING=ON \
60
+ -DWITHOUT_MANPAGES=ON \
61
+ -DDISABLE_LTO=ON \
62
+ -DENABLE_STATIC=ON \
63
+ -B build-asan
64
+ cmake --build build-asan
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
4
4
CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR
5
5
CMAKE_C_COMPILER_ID STREQUAL "GNU" )
6
6
7
- add_compile_options (-Wall -Wextra -Werror )
8
7
add_compile_options (-Wformat -Wformat-nonliteral -Wformat-security )
9
8
add_compile_options (-Wshadow )
10
9
add_compile_options (-Wcast-qual )
@@ -13,6 +12,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
13
12
add_compile_options (-pedantic -pedantic-errors )
14
13
add_compile_options (-fpie -fpic )
15
14
if (NOT FUZZING )
15
+ add_compile_options (-Wall -Wextra -Werror )
16
16
add_compile_options (-O2 )
17
17
add_definitions (-D_FORTIFY_SOURCE=2 )
18
18
endif ()
You can’t perform that action at this time.
0 commit comments