Issue 90978
Summary Crash involving addresses of switch case labels
Labels new issue
Assignees
Reporter davedets
    Hermes is a _javascript_ execution engine from Meta.  It has an interpreter, the heart of which is a big switch statement over the (bytecode) instructions.  We use the ability to take the address of case labels of the switch to do faster dispatching -- jumping to the case for the next instruction directly at the end of each instruction's processing, rather than jumping back to the top of the loop to enter the switch again.

In the course of development, I seemed to have gotten into a state where errors in the source related to these case label addresses (when one was not defined) cause the compiler to crash.

Here is what the compiler printed.  I'll upload the .cpp and .sh files, which I verified do repro the problem.  There was no .crash file at the indicated location, however.
[Interpreter-crash.zip](https://github.com/llvm/llvm-project/files/15202275/Interpreter-crash.zip)


clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/30/scwjfyss0nj2j7s49x2hvpb80000gn/T/Interpreter-d48d4d.cpp
clang: note: diagnostic msg: /var/folders/30/scwjfyss0nj2j7s49x2hvpb80000gn/T/Interpreter-d48d4d.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/ddetlefs/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg:


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to