Skip to content

Commit

Permalink
Guard no_sanitize attribute more carefully.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Jan 13, 2024
1 parent 8db2305 commit 8e18c33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/engine/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,12 @@ struct _stack
data = end;
}

#ifdef __clang__
#if defined(__clang__) && defined(__has_feature)
#if __has_feature(address_sanitizer)
// This function calls not properly type-erased callbacks
__attribute__((no_sanitize("undefined")))
#endif
#endif
void done()
{
if ( cleanups_size > cleanups_t::size_type(0) )
Expand Down
4 changes: 3 additions & 1 deletion src/engine/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,12 @@ static void hashrehash( struct hash * hp )
}


#ifdef __clang__
#if defined(__clang__) && defined(__has_feature)
#if __has_feature(address_sanitizer)
// This function calls not properly type-erased callbacks
__attribute__((no_sanitize("undefined")))
#endif
#endif
void hashenumerate( struct hash * hp, void (* f)( void *, void * ), void * data
)
{
Expand Down

0 comments on commit 8e18c33

Please sign in to comment.