Skip to content

Commit

Permalink
Remove no_sanitize attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Oct 23, 2023
1 parent 4cd7144 commit 3401ca9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/internal/formatdetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,6 @@ auto read_signature( IInStream* stream, uint32_t size ) noexcept -> uint64_t {
}

// Note: the left shifting of the signature mask might overflow, but it is intentional, so we suppress the sanitizer.
#if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 12)
__attribute__((no_sanitize ("unsigned-shift-base")))
#endif
auto detect_format_from_signature( IInStream* stream ) -> const BitInFormat& {
constexpr auto kSignatureSize = 8U;
constexpr auto kBaseSignatureMask = 0xFFFFFFFFFFFFFFFFULL;
Expand Down
3 changes: 0 additions & 3 deletions src/internal/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ constexpr inline auto check_overflow( int64_t position, int64_t offset ) noexcep
( ( offset < 0 ) && ( position < ( ( std::numeric_limits< int64_t >::min )() - offset ) ) );
}

#if defined(__clang__) && defined(__clang_major__) && (__clang_major__ >= 4)
__attribute__((no_sanitize ("unsigned-integer-overflow")))
#endif
inline auto seek_to_offset( uint64_t& position, int64_t offset ) noexcept -> HRESULT {
// Checking if adding the offset would result in the unsigned wrap around of the current position.
if ( offset < 0 ) {
Expand Down

0 comments on commit 3401ca9

Please sign in to comment.