Skip to content

[RV64_DYNAREC] Fix writing read-only page for SHA/AES opcode - #4370

Merged
ksco merged 1 commit into
ptitSeb:mainfrom
zengdage:fix-qq-regression
Sep 8, 2026
Merged

[RV64_DYNAREC] Fix writing read-only page for SHA/AES opcode#4370
ksco merged 1 commit into
ptitSeb:mainfrom
zengdage:fix-qq-regression

Conversation

@zengdage

@zengdage zengdage commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

If Ex is memory source operand, maybe not need to write back. If Ex pointer to read-only page, if (!MODREG) PUTEX_vector(v1, VECTOR_SEW32) will cause SIGSEGV error.

QQ app error report:

[BOX64] 264538|SIGSEGV @0x3f9decdd7a (syscall) (x64pc=0x3f84c8a6d3/"box64/syscall + 0x13", rsp=0x397f3fa780, stack=0x397ec00000:0x397f400000 own=0x397ec00000 fp=0x397f3fa7a8), for accessing 0x3f9f7ca630 (code=2/prot=1), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
RSP-0x20:0x0000000000000000 RSP-0x18:0x000000397f3fabd0 RSP-0x10:0x000000397f3fa808 RSP-0x08:0x000000397f3fa7a8
RSP+0x00:0x00000001076ec066 RSP+0x08:0x00000030000c45f8 RSP+0x10:0x000000397f3fabd0 RSP+0x18:0x000000000000000b
RAX:0x0000000000000000 RCX:0x000000000000000b RDX:0x000000000004095a RBX:0x000000000000000b
RSP:0x000000397f3fa780 RBP:0x000000397f3fa7a8 RSI:0x00000000000408ac RDI:0x0000000000000129
 R8:0x000000397f3fabd0  R9:0x000000397f3fa758 R10:0x0000000000000000 R11:0x000000003a190f11
R12:0x0000000000000000 R13:0x000000397f3fa7c0 R14:0x000000397f3fabd0 R15:0x00000000000408ac
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0000 GS:0x0000 FSBASE=0x3974010880 GSBASE=(nil)

Maps:

3f9e5e3000-3fa0eb6000 r--p 00000000 08:03 500609                         /home/bianbu/qq/opt/QQ/resources/app/wrapper.node

If `Ex` is memory source operand, not need to write back. If `Ex` pointer to
read-only page, `if (!MODREG) PUTEX_vector(v1, VECTOR_SEW32)` will cause SIGSEGV
error.
@ptitSeb
ptitSeb requested a review from ksco September 8, 2026 09:51
@ksco
ksco merged commit e2219d8 into ptitSeb:main Sep 8, 2026
28 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.

3 participants