Skip to content

Commit f9f796b

Browse files
b92paulpaulhsia
authored andcommitted
[MSAN] Enable memory sanitizer build (google#8094)
* CRAS: Use CARGO_BUILD_TARGET="x86_64-unknown-linux-gnu" In oss-fuzz, to build with MemorySanitizer, Rust part needs to use ``` CARGO_BUILD_TARGET="x86_64-unknown-linux-gnu" ``` to resolve libc `MemorySanitizer: use-of-uninitialized-value` error according to google#3469. * CRAS: Add new member to auto_ccs Co-authored-by: paulhsia <[email protected]>
1 parent 23c401a commit f9f796b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

projects/cras/build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
cd ${SRC}/adhd/cras
2525
./git_prepare.sh
2626
mkdir -p ${WORK}/build && cd ${WORK}/build
27+
export CARGO_BUILD_TARGET="x86_64-unknown-linux-gnu"
2728
CFLAGS="${CFLAGS} -DHAVE_FUZZER" ${SRC}/adhd/cras/configure --disable-featured
2829
make -j$(nproc)
29-
cp ${WORK}/build/src/server/rust/target/release/libcras_rust.a /usr/local/lib
30+
cp ${WORK}/build/src/server/rust/target/${CARGO_BUILD_TARGET}/release/libcras_rust.a /usr/local/lib
3031

3132
CRAS_FUZZERS="rclient_message cras_hfp_slc cras_fl_media_fuzzer"
3233

projects/cras/project.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ auto_ccs:
1414
1515
1616
17-
builds_per_day: 2
17+
18+
sanitizers:
19+
- address
20+
- memory
21+
- undefined
22+
builds_per_day: 4
1823
main_repo: 'https://chromium.googlesource.com/chromiumos/third_party/adhd'

0 commit comments

Comments
 (0)