[PATCH] D53931: TableGen: Fix ASAN error
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 31 10:20:22 PDT 2018
simon_tatham added inline comments.
================
Comment at: utils/TableGen/SearchableTableEmitter.cpp:168
- "' too large to search");
- return "uint" + utostr(NumBits) + "_t";
} else if (Field.Enum || Field.IsIntrinsic || Field.IsInstruction)
----------------
nhaehnle wrote:
> kparzysz wrote:
> > How does the problem actually occur? utostr returns a temporary std::string which should exist until the sum is constructed. What object is used-after-scope?
> Must be some temporary object (the ASAN dump calls it "unknown"). To be honest, I was surprised about it as well, but I don't really have the time to dig into it further.
I just did have a go at digging into it, because the line numbers in the backtrace make sense with respect to that header file on my nearest 18.10 box.
But it's happening in a move constructor for the type `_Alloc_hider` which is internal to libstdc++ (and contained in a string that's being move-constructed in turn by the `operator+` doing one of the concatenations). At the point where I started having to understand someone else's C++ library internals I decided I didn't have the time either :-)
Repository:
rL LLVM
https://reviews.llvm.org/D53931
More information about the llvm-commits
mailing list