CI: Add -DVL_LEAK_CHECKS in asan builds (#6444)
This commit is contained in:
parent
841254e9e8
commit
4ab0690428
|
|
@ -44,6 +44,7 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
|||
CONFIGURE_ARGS="--enable-longtests --enable-ccwarn"
|
||||
if [ "$CI_ASAN" = 1 ]; then
|
||||
CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-asan"
|
||||
CXX="$CXX -DVL_LEAK_CHECKS"
|
||||
fi
|
||||
./configure $CONFIGURE_ARGS --prefix="$INSTALL_DIR"
|
||||
ccache -z
|
||||
|
|
|
|||
|
|
@ -120,6 +120,11 @@
|
|||
// Allowed on: function, method. (-fthread-safety)
|
||||
#define VL_ASSERT_CAPABILITY(x) \
|
||||
VL_CLANG_ATTR(assert_capability(x))
|
||||
// Disable thread safety analysis for the annotted function
|
||||
// Use this only when absolutely sure code is correct, but too
|
||||
// complicated for the compiler to prove.
|
||||
#define VL_NO_THREAD_SAFETY_ANALYSIS \
|
||||
VL_CLANG_ATTR(no_thread_safety_analysis)
|
||||
|
||||
// Require mutex locks only in code units which work with enabled multi-threading.
|
||||
#if !defined(VL_MT_DISABLED_CODE_UNIT)
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ void V3Broken::brokenAll(AstNetlist* nodep) {
|
|||
|
||||
// Mark every node in the tree
|
||||
const uint8_t brokenCntCurrent = s_brokenCntGlobal.get();
|
||||
nodep->foreach([brokenCntCurrent](AstNode* nodep) {
|
||||
nodep->foreach([brokenCntCurrent](AstNode* nodep) VL_NO_THREAD_SAFETY_ANALYSIS {
|
||||
#ifdef VL_LEAK_CHECKS
|
||||
UASSERT_OBJ(s_allocTable.isAllocated(nodep), nodep,
|
||||
"AstNode is in tree, but not allocated");
|
||||
|
|
|
|||
Loading…
Reference in New Issue