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.
(cherry picked from commit 4c2085b5f7)
This commit is contained in:
@@ -1007,6 +1007,7 @@ static void print_hex_location(outputStream* st, const_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, const_address start, const_address end, int unitsize,
|
||||
bool print_ascii, int bytes_per_line, const_address logical_start, const_address highlight_address) {
|
||||
constexpr int max_bytes_per_line = 64;
|
||||
|
||||
@@ -107,4 +107,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
|
||||
|
||||
@@ -606,6 +606,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