Skip to content

Conversation

@5265325
Copy link

@5265325 5265325 commented Nov 15, 2025

The new refill_icache function has an implicit conversion bug. It result in the instruction sign expansion. When an illegal instruction exception is triggered, it manifests as an incorrect xtval. As shown in the following log:

core   0: 0x00007ff5942a0d80 (0xffffffffc2202573) csrr    a0, vlenb
core   0: exception trap_illegal_instruction, epc 0x00007ff5942a0d80
core   0:           tval 0xffffffffc2202573

@aswaterman
Copy link
Collaborator

Yes, I just caught this myself too, and was going to use the same fix.

@aswaterman aswaterman merged commit 4e4da99 into riscv-software-src:master Nov 17, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants