Skip to content

Commit 155697f

Browse files
author
SendaoYan
committed
8349623: [ASAN] Gtest os_linux.glibc_mallinfo_wrapper_vm fails
Reviewed-by: stuefe
1 parent 4066f33 commit 155697f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/hotspot/gtest/runtime/test_os_linux.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -444,26 +444,28 @@ TEST_VM(os_linux, decoder_get_source_info_valid_overflow_minimal) {
444444
#endif // clang
445445

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

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

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

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

465466
os::free(p);
466467
}
468+
#endif // ADDRESS_SANITIZER
467469
#endif // __GLIBC__
468470

469471
#endif // LINUX

0 commit comments

Comments
 (0)