[PATCH] D40170: [llvm-tblgen] - Stop using std::string in RecordKeeper.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 22:57:06 PST 2017


grimar added a comment.

In https://reviews.llvm.org/D40170#933352, @aheejin wrote:

> When built with memory sanitizer, this change causes many `use-of-uninitialized-value` errors and also causes compilation failures when built with the cmake option `-DBUILD_SHARED_LIBS=ON`. AFAIK, `StringRef` does not store the string contents in itself and just maintains a pointer to an external storage. Are you sure all the string keys supplied to `Classes` or `Defs` map in `RecordKeeper` class are persistent throughout all the uses of those maps?
>
> If you can't reproduce the same error, try building with the memory sanitizer, which can be enabled with the cmake option `-DLLVM_USE_SANITIZER=Memory`. If you confirm this problem, I suggest maybe reverting this change.


I'll try to reproduce it, thanks for reporting. Reverted for now in r318899.


Repository:
  rL LLVM

https://reviews.llvm.org/D40170





More information about the llvm-commits mailing list