Skip to content

Commit d89d638

Browse files
committed
Attempt to fix buildbot after r354972 [#1]. NFCI.
llvm-svn: 355013
1 parent c5792aa commit d89d638

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cc

+6-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ bool __sanitizer_symbolize_code(const char *ModuleName, uint64_t ModuleOffset,
3737
{
3838
llvm::raw_string_ostream OS(Result);
3939
llvm::symbolize::DIPrinter Printer(OS);
40+
// TODO: it is neccessary to set proper SectionIndex here.
41+
// object::SectionedAddress::UndefSection works for only absolute addresses.
4042
auto ResOrErr =
41-
getDefaultSymbolizer()->symbolizeInlinedCode(ModuleName, ModuleOffset);
43+
getDefaultSymbolizer()->symbolizeInlinedCode(ModuleName, {ModuleOffset, object::SectionedAddress::UndefSection});
4244
Printer << (ResOrErr ? ResOrErr.get() : llvm::DIInliningInfo());
4345
}
4446
return __sanitizer::internal_snprintf(Buffer, MaxLength, "%s",
@@ -51,8 +53,10 @@ bool __sanitizer_symbolize_data(const char *ModuleName, uint64_t ModuleOffset,
5153
{
5254
llvm::raw_string_ostream OS(Result);
5355
llvm::symbolize::DIPrinter Printer(OS);
56+
// TODO: it is neccessary to set proper SectionIndex here.
57+
// object::SectionedAddress::UndefSection works for only absolute addresses.
5458
auto ResOrErr =
55-
getDefaultSymbolizer()->symbolizeData(ModuleName, ModuleOffset);
59+
getDefaultSymbolizer()->symbolizeData(ModuleName, {ModuleOffset, object::SectionedAddress::UndefSection});
5660
Printer << (ResOrErr ? ResOrErr.get() : llvm::DIGlobal());
5761
}
5862
return __sanitizer::internal_snprintf(Buffer, MaxLength, "%s",

llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ void IntelJITEventListener::notifyObjectLoaded(
147147
// Build the function loaded notification message
148148
iJIT_Method_Load FunctionMessage =
149149
FunctionDescToIntelJITFormat(*Wrapper, Name->data(), Addr, Size);
150-
DILineInfoTable Lines = Context->getLineInfoForAddressRange(Addr, Size);
150+
// TODO: it is neccessary to set proper SectionIndex here.
151+
// object::SectionedAddress::UndefSection works for only absolute addresses.
152+
DILineInfoTable Lines = Context->getLineInfoForAddressRange({Addr, object::SectionedAddress::UndefSection}, Size);
151153
DILineInfoTable::iterator Begin = Lines.begin();
152154
DILineInfoTable::iterator End = Lines.end();
153155
for (DILineInfoTable::iterator It = Begin; It != End; ++It) {

0 commit comments

Comments
 (0)