diff options
| author | Ha Thach <[email protected]> | 2023-02-22 12:54:32 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-22 12:54:32 +0700 |
| commit | 557bf82336311611ba3b06e57f48d03362f3d2c3 (patch) | |
| tree | 97bbedf9ff81a90bd8a85ab33abcc2543bd5df33 /src/common/tusb_compiler.h | |
| parent | 334263523756bf6539546bd11915299704034a39 (diff) | |
| parent | bcf5e5f72918a7f5ee991f8d1cc3d4f9a3b2b306 (diff) | |
Merge pull request #1867 from silvergasp/thread_local_globals
fix: Change all static variables to thread when fuzzing
Diffstat (limited to 'src/common/tusb_compiler.h')
| -rw-r--r-- | src/common/tusb_compiler.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/tusb_compiler.h b/src/common/tusb_compiler.h index a0a49d7ec..3eb6b41f7 100644 --- a/src/common/tusb_compiler.h +++ b/src/common/tusb_compiler.h @@ -61,6 +61,13 @@ #define TU_VERIFY_STATIC(const_expr, _mess) enum { TU_XSTRCAT(_verify_static_, _TU_COUNTER_) = 1/(!!(const_expr)) } #endif +/* --------------------- Fuzzing types -------------------------------------- */ +#ifdef _FUZZ + #define _fuzz_thread __thread +#else + #define _fuzz_thread +#endif + // for declaration of reserved field, make use of _TU_COUNTER_ #define TU_RESERVED TU_XSTRCAT(reserved, _TU_COUNTER_) |
