Fix false positives from mjData stack leakage detection.
When built and run under address sanitizer (asan), `mj_markStack` and `mj_freeStack` are instrumented to detect leakage of mjData stack frames. When the compiler inlines several callees that call into mark/free in the same function, this instrumentation requires that the compiler retains separate mark/free calls for each original callee. This change adds necessary optimization barriers to ensure that this is the case. PiperOrigin-RevId: 609373993 Change-Id: I30dfd998fb66530735348e9715d92ee713f28210
This commit is contained in:
committed by
Copybara-Service
parent
34d4a69027
commit
b04de39e4e
@@ -80,7 +80,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef ADDRESS_SANITIZER
|
||||
int _mj_comparePcFuncName(void* pc1, void* pc2);
|
||||
int mj__comparePcFuncName(void* pc1, void* pc2);
|
||||
const char* mj__getPcDebugInfo(void* pc);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user