summary refs log tree commit diff stats
path: root/results/classifier/118/files/1734
blob: 5dcce7313163b2a4b5526910c32e6a59c7f2835d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
files: 0.890
arm: 0.880
performance: 0.856
device: 0.768
architecture: 0.703
graphic: 0.625
kernel: 0.567
semantic: 0.498
PID: 0.483
user-level: 0.479
network: 0.470
boot: 0.468
register: 0.457
risc-v: 0.448
permissions: 0.447
socket: 0.438
vnc: 0.437
VMM: 0.430
peripherals: 0.399
ppc: 0.382
debug: 0.341
hypervisor: 0.292
mistranslation: 0.250
virtual: 0.245
TCG: 0.228
assembly: 0.171
KVM: 0.133
i386: 0.112
x86: 0.029

mmap-ing more than 1GB of files fails on v8.0 of QEMU, but works on older version
Description of problem:
Trying to run an application using QEMU user mode for an ARM binary.  My host system is Ubuntu 22.04 based.  The v6.2 from Ubuntu repos is able to mmap files that contain more than 1GB of address space, but version 8.0 that I compiled will not.

I created a repo with a readme, and a simple application that you can use to demonstrate the problem:
https://github.com/mwales/qemu_mmap_test

Example application simply takes a list of files, mmaps the entire file into memory, and then computes a checksum of the file data.  Once the file(s) sizes exceed around 1GB, the mmap calls will fail because the memory from 0x00000000 - 0x40000000 has been exhausted.
Steps to reproduce:
1. Compile test application that mmaps entire files
2. Create 5 256MB test files
3. Run the program tell it to mmap all the files.  The first 3 files succeed, but the 4th when run gets a -1 returned from mmap.
Additional information:
Lots of details on my github writeup and a demo of the bug in question.

It seems that this 1GB limit is an artifact of where QEMU loaded the original ELF binary at (0x40000000).  I've also been playing around with moving that address using the -B 0x80000000 option, but I've encountered other problems doing that.  As I diagnose that, I figured I would write up this report on what I've seen so far incase I'm doing something dumb / creating a bad build or something.