[llvm] [RFC][Support] Introduce buffered_svector_ostream (PR #97704)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 11:18:42 PDT 2024
aengelke wrote:
> Is there an estimate of the in-tree violations?
This PR includes a sample -- I would estimate that maybe half of the cases (mostly code written past 2015) need code changes (calling destructor/syncing; use tell instead of size). There are a few cases where this is not completely obvious transformation (read: needs context across multiple functions/files).
> If the conceived out-of-tree breakage is small, we could make this part of LLVM_ENABLE_ABI_BREAKING_CHECKS initially, and possibly call `__asan_poison_memory_region` to detect `[tell(), size())` access (due to accessing `SmallVector` before synchronization).
That could work, yes. write() would become very expensive in sanitizer builds, though.
https://github.com/llvm/llvm-project/pull/97704
More information about the llvm-commits
mailing list