Skip to content

Commit bfb6de5

Browse files
author
Afshin Zafari
committed
8377429: Warning as error in asan build in test_nmt_cornercases.cpp on Linux
Reviewed-by: dholmes, syan
1 parent bd2a3b8 commit bfb6de5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/hotspot/gtest/nmt/test_nmt_cornercases.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 2022, 2023 SAP SE. All rights reserved.
3-
* Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -31,16 +31,16 @@
3131
#include "testutils.hpp"
3232
#include "unittest.hpp"
3333

34+
// ASAN complains about allocating very large sizes
35+
#if !INCLUDE_ASAN
36+
3437
// Check NMT header for integrity, as well as expected type and size.
3538
static void check_expected_malloc_header(const void* payload, MemTag mem_tag, size_t size) {
3639
const MallocHeader* hdr = MallocHeader::resolve_checked(payload);
3740
EXPECT_EQ(hdr->size(), size);
3841
EXPECT_EQ(hdr->mem_tag(), mem_tag);
3942
}
4043

41-
// ASAN complains about allocating very large sizes
42-
#if !INCLUDE_ASAN
43-
4444
// Check that a malloc with an overflowing size is rejected.
4545
TEST_VM(NMT, malloc_failure1) {
4646
void* p = os::malloc(SIZE_MAX, mtTest);

0 commit comments

Comments
 (0)