mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Enable running when built with Clang's -fsanitize=address
This commit is contained in:
parent
9eaefc3685
commit
4228721351
3 changed files with 15 additions and 3 deletions
|
@ -35,6 +35,8 @@
|
|||
#ifndef AUTOSEGS_H
|
||||
#define AUTOSEGS_H
|
||||
|
||||
#include "doomtype.h"
|
||||
|
||||
#define REGMARKER(x) (x)
|
||||
typedef void * const REGINFO;
|
||||
typedef void * NCREGINFO;
|
||||
|
@ -73,11 +75,11 @@ class FAutoSegIterator
|
|||
}
|
||||
Probe = Head;
|
||||
}
|
||||
NCREGINFO operator*() const
|
||||
NCREGINFO operator*() const NO_SANITIZE
|
||||
{
|
||||
return *Probe;
|
||||
}
|
||||
FAutoSegIterator &operator++()
|
||||
FAutoSegIterator &operator++() NO_SANITIZE
|
||||
{
|
||||
do
|
||||
{
|
||||
|
|
|
@ -1986,7 +1986,7 @@ END_POINTERS
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
static int STACK_ARGS cregcmp (const void *a, const void *b)
|
||||
static int STACK_ARGS cregcmp (const void *a, const void *b) NO_SANITIZE
|
||||
{
|
||||
const PClass *class1 = *(const PClass **)a;
|
||||
const PClass *class2 = *(const PClass **)b;
|
||||
|
|
|
@ -113,6 +113,16 @@ typedef TMap<int, PClassActor *> FClassMap;
|
|||
#define NOVTABLE
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#if defined(__has_feature) && __has_feature(address_sanitizer))
|
||||
#define NO_SANITIZE __attribute__((no_sanitize("address")))
|
||||
#else
|
||||
#define NO_SANITIZE
|
||||
#endif
|
||||
#else
|
||||
#define NO_SANITIZE
|
||||
#endif
|
||||
|
||||
#include "basictypes.h"
|
||||
|
||||
// Bounding box coordinate storage.
|
||||
|
|
Loading…
Reference in a new issue