[scudo][standalone] Fix tests under ASan/UBSan
Fix a potential UB in `appendSignedDecimal` (with -INT64_MIN) by making it a special case. Fix the terrible test cases for `isOwned`: I was pretty sloppy on those and used some stack & static variables, but since `isOwned` accesses memory prior to the pointer to check for the validity of the Scudo header, it ended up being detected as some global and stack buffer out of bounds accesses. So not I am using buffers with enough room so that the test will not access memory prior to the variables. With those fixes, the tests pass on the ASan+UBSan Fuchsia build. Thanks to Roland for pointing those out! Differential Revision: https://reviews.llvm.org/D88170
Loading
Please sign in to comment