Skip to content

Commit e409cd2

Browse files
authored
xs: project updates and fixes (#12249)
Updating XS project: * Removing experimental from MSAN. * Updating auto ccs Additionally, we update the build to : - Reduce the number of metering units. This should fix timeouts -- the majority are test cases that run for too long and do not hit the meter limit. - Re-enable `leak_check_at_exit`. We have a custom allocator for fuzzing, so we force purging memory in abort paths (to avoid "leaks" that are transient allocations expected to clean up at exit, which is imminent). As a result, we only report leaks that would have been long-lived, survived VM destruction, and therefore true memory leaks. - Remove sleep functions from the seed corpus. This should fix timeouts caused by the fuzzer calling functions that sleep indefinitely.
1 parent 0cc69ba commit e409cd2

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

projects/xs/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ RUN git clone --depth 1 https://github.com/tc39/test262 && \
3939
find test262/test/built-ins -iname '*.js' -exec stripcomments --write --confirm-overwrite '{}' \+ && \
4040
# strip empty lines
4141
find test262/test/built-ins -iname '*.js' -exec sed -i '/^[[:space:]]*$/d' '{}' \+ && \
42+
# strip functions that sleep
43+
find test262/test/built-ins -iname '*.js' -exec grep -l 'Atomics\.wait' {} \; -exec rm -f {} \; && \
4244
find test262/test/built-ins -iname '*.js' | zip -@ -q $SRC/xst_seed_corpus.zip
4345

4446
RUN git clone --depth=1 https://github.com/Moddable-OpenSource/moddable moddable && \

projects/xs/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ REALBIN_PATH=$OUT
2828

2929
# build main target
3030
cd "$MODDABLE/xs/makefiles/lin"
31-
FUZZING=1 OSSFUZZ=1 FUZZ_METER=10240000 make debug
31+
FUZZING=1 OSSFUZZ=1 FUZZ_METER=2560000 make debug
3232

3333
cd "$MODDABLE"
3434
cp ./build/bin/lin/debug/xst $REALBIN_PATH/xst
@@ -37,7 +37,7 @@ cp $SRC/xst.options $OUT/
3737
# build jsonparse target
3838
cd "$MODDABLE/xs/makefiles/lin"
3939
make -f xst.mk clean
40-
FUZZING=1 OSSFUZZ=1 OSSFUZZ_JSONPARSE=1 FUZZ_METER=10240000 make debug
40+
FUZZING=1 OSSFUZZ=1 OSSFUZZ_JSONPARSE=1 FUZZ_METER=2560000 make debug
4141

4242
cd "$MODDABLE"
4343
cp ./build/bin/lin/debug/xst $REALBIN_PATH/xst_jsonparse

projects/xs/project.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ primary_contact: "[email protected]"
44
auto_ccs:
55
66
7-
87
98
sanitizers:
109
- address
11-
- memory:
12-
experimental: True
10+
- memory
1311
- undefined:
1412
experimental: True
1513
main_repo: 'https://github.com/Moddable-OpenSource/moddable.git'

projects/xs/xst.options

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[asan]
22
detect_stack_use_after_return=0
3-
leak_check_at_exit=0

0 commit comments

Comments
 (0)