Repository navigation
Commit ef4c628
test_p2cx_tledger_io: replace the nothrow operator new/delete forms too
The test replaces the global operator new/delete with malloc/free to count
allocations, but not the nothrow forms. CommandScratchStore allocates with
`new (std::nothrow)`, so under ASan that block came from the sanitizer's own
nothrow new and was released by the replaced operator delete's free():
alloc-dealloc-mismatch abort (sanitizers leg of PR #496, rj-20261024t184800-7cdb3a,
test_p2cx_tledger_io). Add malloc-backed operator new/new[] (std::nothrow_t) with
the same counter, and the matching nothrow operator delete/delete[]. Test only;
no src or include change.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>1 parent d21ea8d commit ef4c628
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
0 commit comments