aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2021-02-10 17:34:05 -0800
committerWouter van Oortmerssen <aardappel@gmail.com>2021-02-18 11:50:14 -0800
commit508aa69e9dbcf4b4de1876cb1b0e9d2c1dbc176f (patch)
tree1c4b4cf3d1beeb7d80991a4ea7f7f78ed95f77e9 /llvm/unittests/ProfileData/CoverageMappingTest.cpp
parent8860f190347467ae9ad2d8688f0ce7feaef4bbfc (diff)
downloadllvm-508aa69e9dbcf4b4de1876cb1b0e9d2c1dbc176f.zip
llvm-508aa69e9dbcf4b4de1876cb1b0e9d2c1dbc176f.tar.gz
llvm-508aa69e9dbcf4b4de1876cb1b0e9d2c1dbc176f.tar.bz2
[WebAssembly] Fix assert in lookup of section symbols
Fixes assert in: https://bugs.llvm.org/show_bug.cgi?id=49036 getWasmSection creates sections if they don't exist, but doesn't add them to the Symbols table. This may cause problems in subsequent calls to getOrCreateSymbol which checks this table, the calls createSymbol assuming it doesn't exist, which then checks UsedNames and finds out it does exist, causing an assert on trying to rename a non-temp symbol. I tried also fixing the somewhat unintuitive forced suffixing (adding `0`), but it turns out that WasmObjectWriter currently assumes these section symbols are unique, so that may have to be a separate fix: https://bugs.llvm.org/show_bug.cgi?id=49252 Also worth noting is that getWasmSection calling createSymbol may not be correct to start with, given that createSymbol seems to assume it is creating non-section symbols. But again, for a future fix. Related: where some of this was introduced: https://github.com/llvm/llvm-project/commit/8d396acac3bc21f688ac707bb42e4698dbdcab7e Differential Revision: https://reviews.llvm.org/D96473
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
0 files changed, 0 insertions, 0 deletions