engine: temporarily disable ASan in MSG_WriteUBitLong (evil!)
This commit is contained in:
parent
f9dab2ad19
commit
767556ccad
2 changed files with 5 additions and 10 deletions
|
@ -83,12 +83,15 @@ typedef uint64_t longtime_t;
|
||||||
#define NONNULL __attribute__(( nonnull ))
|
#define NONNULL __attribute__(( nonnull ))
|
||||||
#define _format( x ) __attribute__(( format( printf, x, x + 1 )))
|
#define _format( x ) __attribute__(( format( printf, x, x + 1 )))
|
||||||
#define ALLOC_CHECK( x ) __attribute__(( alloc_size( x )))
|
#define ALLOC_CHECK( x ) __attribute__(( alloc_size( x )))
|
||||||
|
#define NO_ASAN __attribute__(( no_sanitize( "address" )))
|
||||||
#define RENAME_SYMBOL( x ) asm( x )
|
#define RENAME_SYMBOL( x ) asm( x )
|
||||||
#else
|
#else
|
||||||
#if defined( _MSC_VER )
|
#if defined( _MSC_VER )
|
||||||
#define EXPORT __declspec( dllexport )
|
#define EXPORT __declspec( dllexport )
|
||||||
|
#define NO_ASAN __declspec( no_sanitize_address )
|
||||||
#else
|
#else
|
||||||
#define EXPORT
|
#define EXPORT
|
||||||
|
#define NO_ASAN
|
||||||
#endif
|
#endif
|
||||||
#define GAME_EXPORT
|
#define GAME_EXPORT
|
||||||
#define NORETURN
|
#define NORETURN
|
||||||
|
@ -98,17 +101,9 @@ typedef uint64_t longtime_t;
|
||||||
#define RENAME_SYMBOL( x )
|
#define RENAME_SYMBOL( x )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( __GNUC__ >= 3 )
|
#if ( __GNUC__ >= 3 ) || ( defined( __has_builtin ) && __has_builtin( __builtin_expect ))
|
||||||
#define unlikely( x ) __builtin_expect( x, 0 )
|
#define unlikely( x ) __builtin_expect( x, 0 )
|
||||||
#define likely( x ) __builtin_expect( x, 1 )
|
#define likely( x ) __builtin_expect( x, 1 )
|
||||||
#elif defined( __has_builtin )
|
|
||||||
#if __has_builtin( __builtin_expect )
|
|
||||||
#define unlikely( x ) __builtin_expect( x, 0 )
|
|
||||||
#define likely( x ) __builtin_expect( x, 1 )
|
|
||||||
#else
|
|
||||||
#define unlikely( x ) ( x )
|
|
||||||
#define likely( x ) ( x )
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#define unlikely( x ) ( x )
|
#define unlikely( x ) ( x )
|
||||||
#define likely( x ) ( x )
|
#define likely( x ) ( x )
|
||||||
|
|
|
@ -174,7 +174,7 @@ void MSG_ExciseBits( sizebuf_t *sb, int startbit, int bitstoremove );
|
||||||
|
|
||||||
// Bit-write functions
|
// Bit-write functions
|
||||||
void MSG_WriteOneBit( sizebuf_t *sb, int nValue );
|
void MSG_WriteOneBit( sizebuf_t *sb, int nValue );
|
||||||
void MSG_WriteUBitLong( sizebuf_t *sb, uint curData, int numbits );
|
void MSG_WriteUBitLong( sizebuf_t *sb, uint curData, int numbits ) NO_ASAN;
|
||||||
void MSG_WriteSBitLong( sizebuf_t *sb, int data, int numbits );
|
void MSG_WriteSBitLong( sizebuf_t *sb, int data, int numbits );
|
||||||
void MSG_WriteBitLong( sizebuf_t *sb, uint data, int numbits, qboolean bSigned );
|
void MSG_WriteBitLong( sizebuf_t *sb, uint data, int numbits, qboolean bSigned );
|
||||||
qboolean MSG_WriteBits( sizebuf_t *sb, const void *pData, int nBits );
|
qboolean MSG_WriteBits( sizebuf_t *sb, const void *pData, int nBits );
|
||||||
|
|
Loading…
Add table
Reference in a new issue