ci: build with runtime safety checks for PRs #17808
Draft
+29
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Improves our existing
safe
(bun build:safe
) profile and enables it by default in CI. This is subtly different thanassert
(bun build:assert
) as it does not turn onENABLE_ASSERT
when compiling c++ code.Currently, release builds with assertions enabled will not compile because the
node:crypto
builtin module is large enough to cause anASSERT_UNDER_CONSTEXPR_CONTEXT
macro call inASCIILiteral.h
to exceed clang's constexpr eval step limit (100,000). After we re-writenode:crypto
in native code, we should re-enable assertions in safe builds.Changelog
bun run build:safe
to include nullptr checks in CPP buildssafe
profilesafe
profile by defaultHow did you verify your code works?
This PR enables existing safety checks. If existing tests pass, we're all good. CI failure likely indicates bugs in our code.