Comments (23)
I'm struggling with debugging this, @ptitSeb can you try to fix it when you have the time?
from box64.
Any ideas on how to debug this? It would be great if Electron apps would work.
from box64.
Try with BOX64_ROLLING_LOG=1
to see last call at the segfault, maybe it will help
from box64.
I've tried that, doesn't looks useful.
BOX64: ignoring prctl(PR_SET_SECCOMP, ...)
Last calls
1571|0x104ad3bfb: Calling __pthread_mutex_unlock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D748, 0xB, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3d1b: Calling pthread_mutex_lock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D8D8, 0x3A, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3d3e: Calling __pthread_mutex_unlock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D8D8, 0x3A, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3d81: Calling pthread_mutex_lock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D928, 0xC44, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3da4: Calling __pthread_mutex_unlock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D928, 0xC44, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3eeb: Calling pthread_mutex_lock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D9C8, 0x50E, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3f10: Calling __pthread_mutex_unlock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D9C8, 0x50E, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3f57: Calling pthread_mutex_lock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0DA18, 0x100, 0xFFFFFFF7, ...) => return 0x0
1571|0x104ad3f7c: Calling __pthread_mutex_unlock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0DA18, 0x100, 0xFFFFFFF7, ...) => return 0x0
1571|0x103790ced: Calling clock_gettime (/lib/riscv64-linux-gnu/libc.so.6)(0x1, 0x10B37CC60, 0xFFFFFFF7, ...) => return 0x0
1571|0x107c0e616: Calling clock_gettime (/lib/riscv64-linux-gnu/libc.so.6)(0x1, 0x10B37CC80, 0x44C6FF921E, ...) => return 0x0
1571|0x107c0e616: Calling clock_gettime (/lib/riscv64-linux-gnu/libc.so.6)(0x1, 0x10B37CD40, 0x60CBA, ...) => return 0x0
1571|0x104ac6f69: Calling __getpid (/lib/riscv64-linux-gnu/libc.so.6)(0x38A69530, 0x1, 0x0, ...) => return 0x623
1571|0x103790ced: Calling clock_gettime (/lib/riscv64-linux-gnu/libc.so.6)(0x1, 0x10B37C9F0, 0x0, ...) => return 0x0
1571|0x107c127d6: Calling my___vsnprintf_chk (code)(0x10B37C910, 0x100, 0x1, ...) => return
1571|0x104ad3bd8: Calling pthread_mutex_lock (/lib/riscv64-linux-gnu/libc.so.6)(0x36A0D748, 0xB, 0xFFFFFFF7, ...) => return 0x0
1571|SIGSEGV @0x3ff103f072 (strlen (/lib/riscv64-linux-gnu/libc.so.6)) (x64pc=0x2f0b53/???:"???", rsp=0x10b37c818), for accessing (nil) (code=1)
RAX:0x000000010b37ca40 RCX:0xffffffffffffffff RDX:0x0000000000000001 RBX:0x0000000000000100
RSP:0x000000010b37c818 RBP:0x000000010b37c830 RSI:0x0000000000000100 RDI:0x000000010b37c910
R8:0x00000001029569a3 R9:0x000000010b37c8f0 R10:0x0000000000000017 R11:0x5555555555555555
R12:0x00000001026e5303 R13:0x0000000000000000 R14:0x000000010b37c910 R15:0x000000010b37c910
Segmentation fault
from box64.
Well, the issue is in my___vsnprintf_chk(...)
Must be some wrong wrapping or something like that.
from box64.
Hmm, I remember this function got some fixes just a few days ago, I thought it was fine..
from box64.
Yes, it indeed segfaulted in my___vsnprintf_chk
, might be something off in myStackAlignValist
, I'll debug it later, thanks!
from box64.
When calling my___vsnprintf_chk
, the third vararg on the stack(overflow_arg_area[2]
) is interpreted as a char *
but has some garbage value 0x3ff0000000000000
. Looks like it's not a problem with my___vsnprintf_chk
, the problem comes before it.
from box64.
Thta looks like a float value. What is the fmt
string?
from box64.
It's
[%d:%p] %8.0f ms: %s%s%s %.1f (%.1f) -> %.1f (%.1f) MB, %.1f / %.1f ms %s (average mu = %.3f, current mu = %.3f) %s; %s
gp_offset
is 16, fp_offset
is 48.
from box64.
Floating point values (9 of them out of 16 slots) are not touching the stack, there shouldn't be a float value on the stack.
from box64.
Unless it is! I changed X64_VA_MAX_XMM
from ((6*8)+(8*16))
to ((6*8)+(8*8))
, and it works!!!! That's so unobvious!
from box64.
I'm so happy that VS Code works! Yay!!!
from box64.
It's amazing you can tell from the hex that this is a float...
from box64.
So we should define X64_VA_MAX_XMM
as ((6*8)+(8*16))
when CONVERT_VALIST
is present, otherwise ((6*8)+(8*8))
, right?
from box64.
Ah yes, size of an xmm reg is 16bytes! not 8
(yeah, I see float and double in hex dump... I spend too much time looking at hex dump !!!)
from box64.
VS Code starts fine, but there is only a blank window, which seems an OpenGL issue (not sure). Weixin won't start for some reason, but it's gone much further. It's some progress nevertheless.
from box64.
Yes, it might be an opengl issue. Try withou/without gl4es (Electron should be compatible with GLES2, but I don't remember if I wrapped libGLESv2 :S))
from box64.
With or w/o gl4es acts the same, with some GL errors printed in both ways.
from box64.
I accidentally turned off Dynarec when compiling box64 yesterday, VS Code is still not working with RV64 Dynarec.
from box64.
A lot of diffs on MOV r/m64, imm32
is reported by cosim, which is strange.
Warning, difference between Interpreter and Dynarec in 0x10552f94b (48 c7 47 08 ff ff ff 7f)
=======================================
DIFF: Dynarec | Interpreter
----------------------
MEM: @0x3fb430e8a0 : ff ff ff 7f 00 00 00 00 | ff ff ff 7f ff ff ff ff
from box64.
Looks like a sign extension issue here. But on the interpreter side?
Also, beware, not sure the address given as an error is the right one. It might be off by 1 opcode....
You need to check the generated code around the address to really understand what is going on.
from box64.
It might be off by 1 opcode.
Oh? I didn't aware of that.
But on the interpreter side?
The interpreter is fine, so that got me confused. Anyway I'm trying to look at opcodes near it to see if something is off.
from box64.
Related Issues (20)
- Error compiling box64 0.2.8 with GCC 13.3.0 within Buildroot HOT 6
- visual novel games dowloaded in itch.io HOT 3
- (Ark Survival Ascended) Unimplemented Opcode (C0 D1 48 06) HOT 1
- Unimplemented function propsys.dll.VariantToString HOT 3
- Steam with wow64 has a black screen HOT 3
- When using the fallout 3 launcher the program exits instead of launching fallout HOT 3
- Unable to launch a Unity linux game with box64 HOT 19
- Random game freezes while using box64 HOT 1
- RAR stdout lost HOT 2
- Can't play games made in the OHRRPGCE Engine. HOT 3
- Precompiled builds no longer work. HOT 3
- Minecraft Bedrock server (BDS) on crashes randomly
- Error loading needed lib UnityPlayer.so HOT 3
- Wine's Wayland driver does not load HOT 9
- Failed to load il2cppMemory Statistics HOT 1
- Error during linking in build HOT 5
- Team fortress 2 server not launching HOT 3
- Fear & Hunger SIGABRT on M1 Pro HOT 3
- Fallout New Vegas crashes very often HOT 3
- gnutls_pubkey_export_dh_raw not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box64.