Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault with 'cc1' in riscv32-elf Toolchain on WSL2 #3

Open
cjkzwe opened this issue Apr 10, 2024 · 1 comment
Open

Segmentation Fault with 'cc1' in riscv32-elf Toolchain on WSL2 #3

cjkzwe opened this issue Apr 10, 2024 · 1 comment

Comments

@cjkzwe
Copy link

cjkzwe commented Apr 10, 2024

System Information

Issue Description

Encountering an "internal compiler error: Segmentation fault" with the 'cc1' program when compiling using the riscv32-elf toolchain under WSL2. The error occurs when compiling through the toolchain. I have tried almost every release, but problem still occurs every time.
I have tried to compile this toolchain directly on WSL2, but when executing cross-compilation with the compiled programs, there are always prompts indicating the absence of some library files that seem to be related to newlib. Although this issue is not directly related to the toolchain itself, I would appreciate guidance on how to resolve this problem. Thanks!

The exact error message is as follows:

$ dmesg
...
[  316.287313] cc1[298] vsyscall attempted with vsyscall=none ip:ffffffffff600000 cs:33 sp:7ffefc41cce8 ax:ffffffffff600000 si:0 di:7ffefc41cd10
[  316.299637] cc1[298] vsyscall read attempt denied -- look up the vsyscall kernel parameter if you need a workaround ip:12512f7 cs:33 sp:7ffefc41c110 ax:ffffffffff600000 si:7ffefc41c0a0 di:1253950
[  316.300878] cc1[298]: segfault at ffffffffff600000 ip 00000000012512f7 sp 00007ffefc41c110 error 5 in cc1[400000+1334000]
[  316.301619] Code: 44 00 00 40 80 ff 08 75 82 80 78 01 00 0f 85 78 ff ff ff 0f b6 78 02 48 83 c0 02 e9 ca fc ff ff 0f 1f 00 49 8b 85 98 00 00 00 <80> 38 48 0f 85 38 fe ff ff 48 ba c7 c0 0f 00 00 00 0f 05 48 39 50
[  316.302670] potentially unexpected fatal signal 11.
[  316.302968] CPU: 6 PID: 298 Comm: cc1 Not tainted 5.15.146.1-microsoft-standard-WSL2 #1
[  316.303414] RIP: 0033:0x12512f7
[  316.303609] Code: 44 00 00 40 80 ff 08 75 82 80 78 01 00 0f 85 78 ff ff ff 0f b6 78 02 48 83 c0 02 e9 ca fc ff ff 0f 1f 00 49 8b 85 98 00 00 00 <80> 38 48 0f 85 38 fe ff ff 48 ba c7 c0 0f 00 00 00 0f 05 48 39 50
[  316.304580] RSP: 002b:00007ffefc41c110 EFLAGS: 00010246
[  316.304889] RAX: ffffffffff600000 RBX: 0000000000000000 RCX: 0000000000000000
[  316.305312] RDX: ffffffffffffffff RSI: 00007ffefc41c0a0 RDI: 0000000001253950
[  316.305727] RBP: 00007ffefc41c420 R08: 0000000000000000 R09: 00000000017352c0
[  316.306168] R10: 0000000000000000 R11: 00000000017dda10 R12: 00007ffefc41c270
[  316.306567] R13: 00007ffefc41c180 R14: 0000000000000000 R15: 000000000104e740
[  316.306911] FS:  0000000001abd980 GS:  0000000000000000
@sakumisu
Copy link

I have the same problem, and also i use other linux toolchain like arm, t-head, nucle, nothing problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants