mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-3323 Exclude parts of VM code from sanitizer checks
Exclude VM error-reporting code that treats memory as a raw sequence of bytes from address sanitizer checks. This is needed to only get true reports when running tests against the --enable-asan build.
This commit is contained in:
@@ -990,6 +990,7 @@ static void print_hex_location(outputStream* st, address p, int unitsize) {
|
||||
}
|
||||
}
|
||||
|
||||
ATTRIBUTE_NO_SANITIZE_ADDRESS("Memory is read raw here without any regard for objects' boundaries")
|
||||
void os::print_hex_dump(outputStream* st, address start, address end, int unitsize,
|
||||
int bytes_per_line, address logical_start) {
|
||||
assert(unitsize == 1 || unitsize == 2 || unitsize == 4 || unitsize == 8, "just checking");
|
||||
|
||||
@@ -103,4 +103,10 @@
|
||||
#define ALLOW_C_FUNCTION(name, ...) __VA_ARGS__
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || defined (__GNUC__)
|
||||
# define ATTRIBUTE_NO_SANITIZE_ADDRESS(reason_for_exclusion) __attribute__((no_sanitize_address))
|
||||
#else
|
||||
# define ATTRIBUTE_NO_SANITIZE_ADDRESS(reason_for_exclusion)
|
||||
#endif
|
||||
|
||||
#endif // SHARE_UTILITIES_COMPILERWARNINGS_HPP
|
||||
|
||||
@@ -660,6 +660,7 @@ void VMError::clear_step_start_time() {
|
||||
// could be nested report_and_die() calls on stack (see above). Only one
|
||||
// thread can report error, so large buffers are statically allocated in data
|
||||
// segment.
|
||||
ATTRIBUTE_NO_SANITIZE_ADDRESS("Memory is read raw here without any regard for objects' boundaries")
|
||||
void VMError::report(outputStream* st, bool _verbose) {
|
||||
// Used by reattempt step logic
|
||||
static int continuation = 0;
|
||||
|
||||
Reference in New Issue
Block a user