Skip to content

Commit f2ffbbd

Browse files
author
SendaoYan
committed
8349623: [ASAN] Gtest os_linux.glibc_mallinfo_wrapper_vm fails
Backport-of: 155697fc0ed69f1b4f871b00fe67685177bad59a
1 parent 0ceff4b commit f2ffbbd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/hotspot/gtest/runtime/test_os_linux.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,26 +445,28 @@ TEST_VM(os_linux, decoder_get_source_info_valid_overflow_minimal) {
445445
#endif // clang
446446

447447
#ifdef __GLIBC__
448+
#ifndef ADDRESS_SANITIZER
448449
TEST_VM(os_linux, glibc_mallinfo_wrapper) {
449450
// Very basic test. Call it. That proves that resolution and invocation works.
450451
os::Linux::glibc_mallinfo mi;
451452
bool did_wrap = false;
452453

453-
os::Linux::get_mallinfo(&mi, &did_wrap);
454-
455454
void* p = os::malloc(2 * K, mtTest);
456455
ASSERT_NOT_NULL(p);
457456

457+
os::Linux::get_mallinfo(&mi, &did_wrap);
458+
458459
// We should see total allocation values > 0
459460
ASSERT_GE((mi.uordblks + mi.hblkhd), 2 * K);
460461

461-
// These values also should exceed some reasonable size.
462+
// These values also should less than some reasonable size.
462463
ASSERT_LT(mi.fordblks, 2 * G);
463464
ASSERT_LT(mi.uordblks, 2 * G);
464465
ASSERT_LT(mi.hblkhd, 2 * G);
465466

466467
os::free(p);
467468
}
469+
#endif // ADDRESS_SANITIZER
468470
#endif // __GLIBC__
469471

470472
#endif // LINUX

0 commit comments

Comments
 (0)