8000 Allow running at NULL, and trigger a segfault (backport from box86 5cdc1b9fa2238938e49176fcd937a1294c55a03d ) by rafael2k · Pull Request #948 · ptitSeb/box64 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow running at NULL, and trigger a segfault (backport from box86 5cdc1b9fa2238938e49176fcd937a1294c55a03d ) #948

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

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

rafael2k
Copy link
Contributor

This is just a start, as I "almost" managed to run VARA.exe on wine/hangover with box64 in WoW64, but not there yet. But with this change (same I need to run VARA.exe on box86) I got a bit ahead in the tests.

The debug info:
http://abradig.org.br/hermes/debug.txt

@ptitSeb ptitSeb merged commit 30475f0 into ptitSeb:main Aug 23, 2023
@rafael2k
Copy link
Contributor Author

Thanks. I'm pretty sure the issue I'm facing is related to WoW64 on wine.

@ptitSeb
Copy link
Owner
ptitSeb commented Aug 23, 2023

That can be yeah. Wow64 support is pretty young in box64, there are some bugs left...

@rafael2k
Copy link
Contributor Author

Can you point me which env variables I should set to get as much verbosity as possible for debugging box64?
Anyway, I think I need to focus on debugging wine...

@ptitSeb
Copy link
Owner
ptitSeb commented Aug 23, 2023

For debugging, you need at least BOX64_LOG=1 BOX64_SHOWSEGV=1 BOX64_SHOWBT=1 that gives a good baseline of trace.
For testing, you should try with BOX64_DYNAREC=0 to test without dynarec, just in case. You might want to 8000 use ~/.box64rc and create a profile for your executable to avoid running the whole wine without dynarec.

Also. when looking at a segfault, check CS. If it's 0x0033 it's 64bits code, if it's 0x0023 it's 32bits (and if something else, that probably very wrong)

@ptitSeb
Copy link
Owner
ptitSeb commented Aug 23, 2023

More tips:

What I usualy do is use a "TRACE" enabled build and do a dump of the program (using a profile if it's a windows stuff), with BOX64_TRACE=0-1 BOX64_TRACE_FILE=dump.txt BOX64_DYNAREC_DUMP=2 and then look at the segfault and to the corresponding emitted code. Note that if you don't use a trace enabled box64, the dump x86_64 code will be "generic" and not the exact code, making it a bit more difficult to follow.
When debug linux code I use somethinbg like BOX64_LOAD_ADDR=0x10000000 to have reproductible run (load at the same address), but on wine this as little effect because wine is doing the loading. If the issue is in the main executable, the load address is often fixed, so you can use ghidra or IDA or anything to look at the original code and have a broader view of it is going on...

@rafael2k
Copy link
Contributor Author

Perfect. I'll debug initially with all the debug options enabled, including some of wine. Then, if there is any clear problem, I can take a look in IDA I have installed in a NT4 SP6 that runs VARA fine.

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.

< 3492 /create-branch>
2 participants
0