Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

LowerTypeTest BitSetBuilder causes Access Violation #42505

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR43535
Status NEW
Importance P normal
Reported by Donovan Maas (donovan.t.maas@gmail.com)
Reported on 2019-10-01 22:45:06 -0700
Last modified on 2019-10-01 22:45:06 -0700
Version unspecified
Hardware PC Windows NT
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments TauEditor.vcxproj (15743 bytes, Application/xml)
Blocks
Blocked by
See also
Created attachment 22618
The project file with all of the compilation settings

This happens in LLVM 8.0.1 that ships MSVC 2019 16.3.2, the downloadable
binaries for LLVM 9.0.0, and the custom build for the stack trace that was
cloned and built from commit e3887253165cd6c40accf3ce1534ef0d20ec676b. The OS
is Windows 10 Pro 64Bit Version 1903, Build 18362.356, I am running on an AMD
Ryzen 7 3700X with 16GiB of RAM.

Visual Studio reported that the invalid address was 0x0000000000000008.

When compiling in Release mode the linker crashes and performs a stack dump. It
is able to build without error in Debug mode which leads me to believe it is
caused by some optimization setting. I've included the project file which has
all of the build settings. I have spent several hours fiddling with the
settings of this project and its dependencies and I've yet to identify what is
causing this issue. The differences between Debug and Release are:

UseDebugLibraries: Yes -> No
WholeProgramOptimization: No -> Yes
Optimization: /Od (Disabled) -> /O2 (Maximum Speed)
InlineFunctionExpansion: Default -> /Ob2 (Any Suitable)
FavorSizeOrSpeed: Neither -> /Ot (Favor Fast Code)
OmitFramePointers: No -> Yes
RuntimeLibrary: /MTd (Multi-Threaded Debug Static) -> /MT (Multi-Threaded
Release Static)

GenerateDebugInfo: /DEBUG:FASTLINK -> /DEBUG:FULL

Stack Trace:
lld-link.exe!llvm::lowertypetests::BitSetBuilder::build(void)
lld-link.exe!llvm::lowertypetests::isJumpTableCanonical(class llvm::Function *)
lld-link.exe!llvm::LowerTypeTestsPass::run(class llvm::Module &,class
llvm::AnalysisManager<class llvm::Module> &)
lld-link.exe!llvm::FPPassManager::runOnModule(class llvm::Module &)
lld-link.exe!llvm::legacy::PassManager::run(class llvm::Module &)
lld-link.exe!llvm::detail::PassModel<class llvm::Module,class
llvm::VerifierPass,class llvm::PreservedAnalyses,class
llvm::AnalysisManager<class llvm::Module> >::run(class llvm::Module &,class
llvm::AnalysisManager<class llvm::Module> &)
lld-link.exe!llvm::detail::PassModel<class llvm::Module,class
llvm::VerifierPass,class llvm::PreservedAnalyses,class
llvm::AnalysisManager<class llvm::Module> >::name(void)
lld-link.exe!llvm::lto::backend(struct llvm::lto::Config &,class
std::function<class std::unique_ptr<class llvm::lto::NativeObjectStream,struct
std::default_delete<class llvm::lto::NativeObjectStream> > >,unsigned int,class
std::unique_ptr<class llvm::Module,struct std::default_delete<class
llvm::Module> >,class llvm::ModuleSummaryIndex &)
lld-link.exe!llvm::lto::LTO::runRegularLTO(class std::function<class
std::unique_ptr<class llvm::lto::NativeObjectStream,struct
std::default_delete<class llvm::lto::NativeObjectStream> > >)
lld-link.exe!llvm::lto::LTO::run(class std::function<class
std::unique_ptr<class llvm::lto::NativeObjectStream,struct
std::default_delete<class llvm::lto::NativeObjectStream> > >,class
std::function<class std::function<class std::unique_ptr<class
llvm::lto::NativeObjectStream,struct std::default_delete<class
llvm::lto::NativeObjectStream> > > >)
lld-link.exe!lld::coff::BitcodeCompiler::compile(void)
lld-link.exe!lld::coff::SymbolTable::addCombinedLTOObjects(void)
lld-link.exe!lld::coff::LinkerDriver::link(class llvm::ArrayRef<char const *>)
lld-link.exe!lld::coff::link(class llvm::ArrayRef<char const *>,bool,class
llvm::raw_ostream &)
lld-link.exe!main()
[Inline Frame] lld-link.exe!invoke_main() Line 78
    at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(78)
lld-link.exe!__scrt_common_main_seh() Line 288
    at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()
Quuxplusone commented 4 years ago

Attached TauEditor.vcxproj (15743 bytes, Application/xml): The project file with all of the compilation settings