-
-
Couldn't load subscription status.
- Fork 612
Closed
Description
When building the same way the CI seems to do, and not passing CMAKE_BUILD_TYPE so it defaults to Release (at the bottom of CMakeLists.txt), cmake adds -DNDEBUG (it also does this for MinSizeRel, for trivia). This makes all assert()s do nothing, and the tests pass.
When explicitly passing another type like =Debug or =None, so -DNDEBUG is not present, the asserts are active, so this test fails:
$ ./api_test/api_test
Assertion failed: b->flags & CMARK_NODE__OPEN (/tmp/mytemp.bcmZP4/src/blocks.c: finalize: 262)
zsh: abort (core dumped) ./api_test/api_test
I think this is not caught in CI because nothing explicitly sets another type so the asserts are not checked. Or is that intentional?
I can reproduce this with a basic
cmake -B b -G Ninja -DCMAKE_BUILD_TYPE=Debug
ninja -C b
ctest --test-dir b --output-on-failure
on debian/arch at the time of writing, on db0da21.
Metadata
Metadata
Assignees
Labels
No labels