Commit 5d159fb
authored
[ci] Add ubsan support (#917)
* [ci] Add ubsan support
* [test] Bury Interpreter to avoid LSan noise from CppInterOp#887.
Interpreter_ExternalInterpreter intentionally gives up ownership of
its std::unique_ptr<Interpreter> because running the destructor trips
the teardown-order issue tracked in CppInterOp#887. The bare release()
leaves the pointer unreachable at exit, so LSan classified the whole
CompilerInstance graph (IdentifierTable, Preprocessor, Builtin
identifiers, JIT modules) as ~1 MB of leaks across ~1000 allocations
in the ASan+UBSan sanitizer job.
Switch release() to llvm::BuryPointer, which parks the pointer in a
static GraveYard so LSan sees the graph as reachable via that global.
The Interpreter still lives for program lifetime; only the LSan
classification changes.1 parent ce479ce commit 5d159fb
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
466 | 467 | | |
467 | 468 | | |
468 | 469 | | |
469 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
| |||
0 commit comments