Skip to content
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

Fail to run benchmark programs on Arm64/Linux #514

Open
jserv opened this issue Nov 23, 2024 · 4 comments
Open

Fail to run benchmark programs on Arm64/Linux #514

jserv opened this issue Nov 23, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jserv
Copy link
Contributor

jserv commented Nov 23, 2024

When I ran some standard benchmark programs on Ubuntu Linux (Arm64), several of them crashed with segmentation faults. Execution mode is interpreter.

Tested on

  • Ampere eMAG 8180 + Ubuntu Linux 24.04
  • Apple Silicon M1 + Ubuntu Linux 22.04

Known failure programs: (prebuilt ELF in directory build/riscv32/)

  • qsort
  • primes
  • norx
  • stream
  • aes
  • miniz
@jserv jserv added the bug Something isn't working label Nov 23, 2024
@jserv jserv added this to the release-2024.2 milestone Nov 23, 2024
@RinHizakura
Copy link
Collaborator

RinHizakura commented Nov 23, 2024

Hi @jserv, I found these segmentation faults also happen on x86_64 platform. There could be some regression.

@RinHizakura
Copy link
Collaborator

RinHizakura commented Nov 23, 2024

The change feca1de can cause it. @jserv, have you tried building with -DMEM_SIZE=0xFFFFFFFFULL for a larger memory size? I wonder if I am checking the same issue with you. After increasing the MEM_SIZE, these tests can be run on my ARM64 platform(Jetson AGX Orin Developer Kit).

@vacantron
Copy link
Collaborator

The reason is the reserved memory chunk via mmap() is too small that makes function malloc() access the out-of-bound address in these tests. If we modify

#define MEM_SIZE 0x80000ULL

to 0x8000000UL or larger value could fix this error.

@jserv
Copy link
Contributor Author

jserv commented Dec 2, 2024

If we modify

#define MEM_SIZE 0x80000ULL

to 0x8000000UL or larger value could fix this error.

Le's implement a temporary solution to support executing pre-compiled ELF executable files that aren't SDL-based, with more flexible memory constraint requirements. Later, we should move forward to effective memory management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants