Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

logging_unittest failed for CMAKE_BUILD_TYPE=Release #745

@mikesongming

Description

@mikesongming

All tests passed for Debug build type, but failed at "DeathNoAllocNewHook" for Release build type.
It seems that NewHook not called when testing new int;

$ ./loggint_unittest
[==========] Running 14 tests from 12 test suites.
[----------] Global test environment set-up.
[----------] 1 test from DeathNoAllocNewHook
[ RUN      ] DeathNoAllocNewHook.logging
Function didn't die (unexpected new): { new int; }

Context
GLOG version: commit cd8fbd5

System: MacOS Montery (Intel i7 CPU inside)

$uname -a
Darwin localhost 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64

Compiler: clang-13

$clang -v
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

IDE: VSCode (Version: 1.62.3)
CMAKE: 3.22.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions