Skip to content

Commit 25452ae

Browse files
author
SendaoYan
committed
8349623: [ASAN] Gtest os_linux.glibc_mallinfo_wrapper_vm fails
Backport-of: f2ffbbd70ccaaa97cb7d05c168995dd2599a3d1d
1 parent 44cba7b commit 25452ae

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
@@ -522,26 +522,28 @@ TEST_VM(os_linux, decoder_get_source_info_valid_overflow_minimal) {
522522
#endif // clang
523523

524524
#ifdef __GLIBC__
525+
#ifndef ADDRESS_SANITIZER
525526
TEST_VM(os_linux, glibc_mallinfo_wrapper) {
526527
// Very basic test. Call it. That proves that resolution and invocation works.
527528
os::Linux::glibc_mallinfo mi;
528529
bool did_wrap = false;
529530

530-
os::Linux::get_mallinfo(&mi, &did_wrap);
531-
532531
void* p = os::malloc(2 * K, mtTest);
533532
ASSERT_NOT_NULL(p);
534533

534+
os::Linux::get_mallinfo(&mi, &did_wrap);
535+
535536
// We should see total allocation values > 0
536537
ASSERT_GE((mi.uordblks + mi.hblkhd), 2 * K);
537538

538-
// These values also should exceed some reasonable size.
539+
// These values also should less than some reasonable size.
539540
ASSERT_LT(mi.fordblks, 2 * G);
540541
ASSERT_LT(mi.uordblks, 2 * G);
541542
ASSERT_LT(mi.hblkhd, 2 * G);
542543

543544
os::free(p);
544545
}
546+
#endif // ADDRESS_SANITIZER
545547
#endif // __GLIBC__
546548

547549
#endif // LINUX

0 commit comments

Comments
 (0)