Issue |
153939
|
Summary |
[MC][ARM] `Clang` Crashes When Assembling Invalid ARM `ldrexd` Instructions with `--triple=armv8-none-eabi `
|
Labels |
clang
|
Assignees |
|
Reporter |
venkyqz
|
## Description
+ Pretty similar to this one #153938.
+ The root cause should be similar, a soundness problem in the assembler parser `ARMAsmParser::parseInstruction` / `ARMOperand::getReg`.
+ Expected behavior is to emit diagnostics (e.g., “invalid instruction”, “destination operands must be sequential”), not to crash.
---
## Interesting Facts
- **Clang 18.1.0**:
- Clang **18.1.0** with the same triple/inputs produces correct error messages and exits cleanly (**no crash**).
- This is the latest version that still works, indicating a bug introduced after 18.1.0.
- **ARM gcc 15.1**:
With `arm-linux-gnueabi-gcc -march=armv8-a`, GNU `as` correctly diagnoses the invalid instructions with errors such as:
- ARM register expected -- `ldaexd r0, h0, [r8]'
It does **not crash**.
---
## Steps to reproduce
+ This issue was reproduced in Compiler Explorer using `x86-64 Clang (trunk with assertions)`,`x86-64 Clang 18.1.0`, and `arm gcc 15.1`
+ Comprehensive reproduce link: [https://godbolt.org/z/YjhTYaoqY](https://godbolt.org/z/YjhTYaoqY)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs