pantoniou / libfyaml

Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite.
MIT License
241 stars 74 forks source link

346 test failures when compiling with UBSan/ASan #22

Closed craigbarnes closed 4 years ago

craigbarnes commented 4 years ago
$ make check V=1 CFLAGS='-O2 -g -pipe -fsanitize=address,undefined -fsanitize-address-use-after-scope -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-common'
...
# TOTAL: 996
# PASS:  650
# SKIP:  0
# XFAIL: 0
# FAIL:  346
# XPASS: 0
# ERROR: 0

In test/test-suite.log, it seems all the failures arise from the following 2 errors:

xxhash/xxhash.c:227:52: runtime error: member access within misaligned address 0x7f5615565007 for type 'struct U32_S', which requires 4 byte alignment

lib/fy-emit.c:1685:47: runtime error: left shift of 3 by 30 places cannot be represented in type 'int'
pantoniou commented 4 years ago

Addressed by 9349c93cd8dc971db79dd10105aae2c427178e07 and 4e047b521cae5566e1f3c80515b379b2c82b0aa3.

Please test and report.

craigbarnes commented 4 years ago

Tested and confirmed fixed. Thanks!

# TOTAL: 996
# PASS:  996