PandTomB / uae4arm

UAE4ARM for the Pandora (branch master, but no longer maintained) and RaspberryPi (branch Raspi, current development version)
GNU General Public License v2.0
8 stars 2 forks source link

wget fails to download file when JIT is enabled #10

Closed midwan closed 3 years ago

midwan commented 3 years ago

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:

Expected result (and actual if JIT is disabled): Amiberry - Amiberry_2021-01-21_17-36-33

Actual result if JIT is enabled: Amiberry - Amiberry_2021-01-21_17-37-58

PandTomB commented 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.

PandTomB commented 3 years ago

Fixed with latest commit. This commit may also fix other JIT related bugs.

midwan commented 3 years ago

@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!

PandTomB commented 3 years ago

Everything is working fine on 64 bit OS3.9 on my side.

midwan commented 3 years ago

Interesting, then i just have some difference in my side. Thanks, I'll do an in depth comparison and see what I can find.

PandTomB commented 3 years ago

Did some more checks. Retrieving a different file causes guru meditation. So, there is something wrong in AARCH64...

PandTomB commented 3 years ago

Found bug in AARCH64 jff_DIVLS32. Flags not set...

midwan commented 3 years ago

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!