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

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 18:16:58 PST 2017


aheejin added a comment.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D40170





More information about the llvm-commits mailing list