llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.26k stars 12.09k forks source link

basic SEH test fails #117420

Open jaykrell opened 2 days ago

jaykrell commented 2 days ago
C:\s>clang --version
swift.org clang version 16.0.0
Target: x86_64-unknown-windows-msvc
Thread model: posix
InstalledDir: C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin

C:\s>type 1.c
int main()
{
 __try { *(volatile char*) 0; } __except(1) { return 2; }
}

C:\s>clang-cl  1.c

C:\s>1.exe

C:\s>echo %errorlevel%
-1073741819

That is 0xc0000005 access violation. This program returns 2 with Visual C++.

Hm not sure about this toolchain, I'll try another later.

EugeneZelenko commented 2 days ago

Could you please try 19 or main branch? https://godbolt.org should be helpful.