[PATCH] D81156: [Support] Add stream tie function and use it for errs()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 18:15:53 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/unittests/Support/raw_ostream_test.cpp:436
+ Buffer = "";
+ TiedTo.tie(&TiedStream);
+ TiedTo.SetBufferSize(2);
----------------
I added a pairing `TiedTo.tie(nullptr);`
`TiedStream` was destroyed before `TiedTo` and when flushing `TiedTo`, `TiedStream` has been destroyed => asan stack-use-after-scope failure.
Fixed in ceaee253f4f3079d2786697d099e43e9f61f897a
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81156/new/
https://reviews.llvm.org/D81156
More information about the llvm-commits
mailing list