Issue |
149511
|
Summary |
s390x does not handle PC offset correctly when using CREL
|
Labels |
new issue
|
Assignees |
|
Reporter |
miladfarca
|
```cpp
#include <iostream>
void c() {
throw std::runtime_error("e");
}
void f() {
try {
c();
} catch (...) {
std::cerr << "caught\n";
}
}
int main() {
f();
return 0;
}
```
This could cause a segfault or an infinite loop when compiled with --crel:
```
# clang++ -fuse-ld=lld -Wa,--crel,--allow-experimental-crel 0.cc
# ./a.out
<does not exit>
```
a `brasl` seems to be branchign into itslef:
```
0x1001d04 <main+20> brasl %r14,0x1001d04 <main+20>
```
Seems to be similar to this issue on arm: https://github.com/llvm/llvm-project/issues/141678
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs