<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62449>62449</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
"parser at end of file" crash with `-fasync-exceptions`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
apple1417
</td>
</tr>
</table>
<pre>
I was messing with the various exception flags (trying to catch an exception thrown by an msvc-compiled extern C export), and ran into this crash. Without `-fasync-exceptions` it compiles fine. I was basically just trying random combinations of the flags, no idea if `-fexceptions -fasync-exceptions -fcxx-exceptions` is something that actually makes any sense.
Running using the [`llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64.tar.xz` release from here](https://github.com/mstorsjo/llvm-mingw/releases/tag/20230320), under an ubuntu wsl install.
[uarrayproperty-0941a7.zip](https://github.com/llvm/llvm-project/files/11358971/uarrayproperty-0941a7.zip)
<details>
<summary>Shell output</summary>
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/clang --start-no-unused-arguments --driver-mode=g++ -target x86_64-w64-mingw32 -rtlib=compiler-rt -unwindlib=libunwind -stdlib=libc++ -fuse-ld=lld --end-no-unused-arguments -DARCH_X64 -DUE4 -DUNREALSDK_SHARED @CMakeFiles/unrealsdk.dir/includes_CXX.rsp -g -Wall -Wextra -Wpedantic -fexceptions -fasync-exceptions -fcxx-exceptions -std=gnu++20 -Werror -Winvalid-pch -Xclang -include-pch -Xclang /mnt/p/sdk_shared_test/out/build/mingw-debug/unrealsdk/CMakeFiles/unrealsdk.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /mnt/p/sdk_shared_test/out/build/mingw-debug/unrealsdk/CMakeFiles/unrealsdk.dir/cmake_pch.hxx -MD -MT unrealsdk/CMakeFiles/unrealsdk.dir/src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp.obj -MF CMakeFiles/unrealsdk.dir/src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp.obj.d
-o CMakeFiles/unrealsdk.dir/src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp.obj -c /mnt/p/sdk_shared_test/unrealsdk/src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '/mnt/p/sdk_shared_test/unrealsdk/src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_ZN9unrealsdk6unreal12WrappedArrayD2Ev'
#0 0x00007f3402b7e72a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x97e72a)
#1 0x00007f3402b7c4b4 llvm::sys::CleanupOnSignal(unsigned long) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x97c4b4)
#2 0x00007f3402a74e68 (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x874e68)
#3 0x00007f3401df0520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f3402f9f4d1 llvm::MachineBasicBlock::addSuccessorWithoutProb(llvm::MachineBasicBlock*) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0xd9f4d1)
#5 0x00007f34033fc09b llvm::FastISel::fastEmitBranch(llvm::MachineBasicBlock*, llvm::DebugLoc const&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x11fc09b)
#6 0x00007f3403402e37 llvm::FastISel::selectOperator(llvm::User const*, unsigned int) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x1202e37)
#7 0x00007f3403408482 llvm::FastISel::selectInstruction(llvm::Instruction const*) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x1208482)
#8 0x00007f34035ac8e1 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x13ac8e1)
#9 0x00007f34035ae89a (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x13ae89a)
#10 0x00007f34054ee660 (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x32ee660)
#11 0x00007f3403017682 (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0xe17682)
#12 0x00007f3402ce6d09 llvm::FPPassManager::runOnFunction(llvm::Function&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0xae6d09)
#13 0x00007f3402ce6fa1 llvm::FPPassManager::runOnModule(llvm::Module&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0xae6fa1)
#14 0x00007f3402ce7a37 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0xae7a37)
#15 0x00007f3408da9651 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x1ba9651)
#16 0x00007f340917e39d (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x1f7e39d)
#17 0x00007f3407d19769 clang::ParseAST(clang::Sema&, bool, bool) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0xb19769)
#18 0x00007f340917eead clang::CodeGenAction::ExecuteAction() (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x1f7eead)
#19 0x00007f3409b8b1c1 clang::FrontendAction::Execute() (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x298b1c1)
#20 0x00007f3409b1c70a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x291c70a)
#21 0x00007f3409c1a833 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x2a1a833)
#22 0x0000556523e16c74 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/clang+0x16c74)
#23 0x0000556523e11b6f (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/clang+0x11b6f)
#24 0x00007f34097c7205 (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x25c7205)
#25 0x00007f3402a752d5 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libLLVM-16.so+0x8752d5)
#26 0x00007f34097c9b08 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x25c9b08)
#27 0x00007f340979572b clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x259572b)
#28 0x00007f3409796273 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x2596273)
#29 0x00007f340979e6ef clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/../lib/libclang-cpp.so.16+0x259e6ef)
#30 0x0000556523e14a41 clang_main(int, char**) (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/clang+0x14a41)
#31 0x00007f3401dd7d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#32 0x00007f3401dd7e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#33 0x0000556523e0cd3a _start (/mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin/clang+0xcd3a)
clang-16: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 16.0.0 (https://github.com/llvm/llvm-project.git 08d094a0e457360ad8b94b017d2dc277e697ca76)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: /mnt/p/unrealsdk/llvm-mingw-20230320-msvcrt-ubuntu-18.04-x86_64/bin
clang-16: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-16: note: diagnostic msg: /tmp/uarrayproperty-0941a7.cpp
clang-16: note: diagnostic msg: /tmp/uarrayproperty-0941a7.sh
clang-16: note: diagnostic msg:
********************
gmake[2]: *** [unrealsdk/CMakeFiles/unrealsdk.dir/build.make:452: unrealsdk/CMakeFiles/unrealsdk.dir/src/unrealsdk/unreal/classes/properties/uarrayproperty.cpp.obj] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:167: unrealsdk/CMakeFiles/unrealsdk.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
```
</details>
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMWl1zoziz_jXkRgUFAvNxkQvHHzPznmSTSrI7U-fGJSRhawISRxKJs7_-lAS2kZPsTN6djXcq5cFCqJ-nu9Xdwo2UYmtO6bk3ufAm8zPU6Y2Q56htaxolUXZWCvJ8_gU8IQUaqhTja_DE9AboDQWPSDLRKUC3mLaaCQ6qGq0V8GCu5bOZqgXASOMNQHw0S2-keOKgfDbDjXrEPhZNy2pKAN1qKjmYAbpthdQeLDw4A4gTIBEHjGsB9IYpgCVSmwB8ZXojOg28NPQrpJ459vdilJeGgGkwrK1AxTgNQM-lRIphVNfP4HunNBjgSsSJaMwTJePILgJEZblaZgYLF4ARigCreqkHeeAlBOBXeLs9xqSAEg3VG6uhDdIAYd1ZMA16oAog_gwU5YoGXjj3wmn_edtxbp7o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