It is illegal to have a call without debug info attached in a function
with debug info: it'll crash the backend.
However this pattern can happen after jump-threading, so we need to be
robust against this. The instrumentation was only looking at the block
entry, if there is no debug location there we will now default to the
function's one.
Details
- Reviewers
kcc
Diff Detail
- Build Status
Buildable 4219 Build 4219: arc lint + arc unit
Event Timeline
piping to llc hits an assert today, I'm not sure it'd be appropriate to use llc here just for this purpose though?
OK, so this patch might not be needed (even though having a better failure here could be helpful). I returned to my original test case to have another look. The verifier is crashing so no need for llc, I updated the test-case. What is needed is the *definition* for the runtime function. This seems to indicate that I'm instrumenting the runtime, which does not seem correct.
My clang is crashing when building for running make check-fuzzer right now, this is how I hit this.
The crash happened in llvm/lib/Fuzzer/FuzzerTracePC.cpp with this invocation:
/Users/mehdi_amini/projects/vanilla/clang/ReleaseAssert/bin/clang++ -DLLVM_BUILD_GLOBAL_ISEL -D_DEBUG -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Fuzzer -I/Users/mehdi_amini/projects/vanilla/clang/llvm-project/llvm/lib/Fuzzer -Iinclude -I/Users/mehdi_amini/projects/vanilla/clang/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -Werror=date-time -std=c++11 -fno-omit-frame-pointer -O1 -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp -fcolor-diagnostics -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters -Werror -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -MD -MT lib/Fuzzer/CMakeFiles/LLVMFuzzerNoMainObjects.dir/FuzzerTracePC.cpp.o -MF lib/Fuzzer/CMakeFiles/LLVMFuzzerNoMainObjects.dir/FuzzerTracePC.cpp.o.d -o lib/Fuzzer/CMakeFiles/LLVMFuzzerNoMainObjects.dir/FuzzerTracePC.cpp.o -c /Users/mehdi_amini/projects/vanilla/clang/llvm-project/llvm/lib/Fuzzer/FuzzerTracePC.cpp -g
See the -fsanitize-coverage=trace-pc-guard,.. without trace-pc-guard being present in the -fno-sanitize-coverage. I think I'm faulty as I was playing with the CMakefiles right now.