Closed midwan closed 3 years ago
This is a problem of JIT with OS3.9. Everything is working fine in OS3.1. Also if you start OS3.9 without JIT, then enable JIT, wget is working fine. The problem occurs in 32 and 64 bit JIT. I'll do some tests to check if I can figure out the instruction, which causes the problem.
Fixed with latest commit. This commit may also fix other JIT related bugs.
@PandTomB It seems this is fixed for 32-bit JIT, but not 64-bit one.
Testing this on 64-bit: Instead of throwing an error, running the same wget
command freezes the emulation. I can get back to the GUI and quit, and I see a segfault in the console behind it.
Booting the 3.9 installation without JIT and running it still works. But if I enable JIT after it has booted, and try to run that same command again, results in the same (segfault) behavior.
Running it under 3.1, on the same 64-bit version also doesn't work, but the symptoms are different.
Instead of freezing the emulation, wget throws a Software Failure there (error #80000003
).
The 32-bit JIT does seem fixed however!
Everything is working fine on 64 bit OS3.9 on my side.
Interesting, then i just have some difference in my side. Thanks, I'll do an in depth comparison and see what I can find.
Did some more checks. Retrieving a different file causes guru meditation. So, there is something wrong in AARCH64...
Found bug in AARCH64 jff_DIVLS32. Flags not set...
Confirmed, this fixes the problem. It also fixes at least one more known bug I've been testing (opening DOpus Magellan lister to browse Aminet would get stuck after connecting). I'm testing other scenarios at the moment, if I find anything else that still remains I'll open a separate issue for it.
Thanks, great work!
Tested on aarch64 with Amiberry (which uses the same JIT engine). Perhaps this is related to the other JIT issues mentioned, or it's separate. Either way, I thought it good to report so we can investigate.
Problem: Using
wget
from AmigaOS to download a file, results in an error as soon as it starts. Disable JIT and it works normally.Steps to recreate:
Get the latest
wget
archive (attached here for your convenience): http://amiga.sourceforge.net/?showpackage=wget wget-1.12r2.lha.zipBoot into an AmigaOS system (I used 3.9 but any should do), ensuring you have bsdsocket.library emulation enabled.
Extract the
wget
archive somewhere, and run the binary with the following parameters as an example:wget -t1 http://file.amiga.sk/amikit/download/Picasso96.lha
Expected result (and actual if JIT is disabled):![Amiberry - Amiberry_2021-01-21_17-36-33](https://user-images.githubusercontent.com/3877365/105381636-83c62d80-5c0f-11eb-8137-ff57f84f065e.png)
Actual result if JIT is enabled:![Amiberry - Amiberry_2021-01-21_17-37-58](https://user-images.githubusercontent.com/3877365/105381754-9fc9cf00-5c0f-11eb-9dd9-b148917c33bb.png)