1 //===-- late_init.cpp -------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "gwp_asan/guarded_pool_allocator.h"
10 #include "gwp_asan/options.h"
11 #include "gwp_asan/tests/harness.h"
13 TEST(LateInit
, CheckLateInitIsOK
) {
14 gwp_asan::GuardedPoolAllocator GPA
;
16 for (size_t i
= 0; i
< 0x100; ++i
)
17 EXPECT_FALSE(GPA
.shouldSample());
19 gwp_asan::options::Options Opts
;
24 EXPECT_TRUE(GPA
.shouldSample());