[TSan] Destroy ScopedReport on early return in ReportDestroyLocked (#228631)
#151495 converted ScopedReport in ReportDestroyLocked from a stack
variable to placement new on __builtin_alloca storage, but left a bare
return when RestoreStack fails. This skipped ~ScopedReport(), leaking
ReportDesc and leaving ScopedErrorReportLock, report_mtx, and
ScopedIgnoreInterceptors permanently held.
Call rep->~ScopedReport() before returning when RestoreStack fails.
Assisted-by: Gemini
GitOrigin-RevId: d0c2076a225debc49757ac945b494a5cebf139a3
1 file changed