summary refs log tree commit diff stats
path: root/results/classifier/zero-shot-user-mode/output/instruction/1783362
diff options
context:
space:
mode:
Diffstat (limited to 'results/classifier/zero-shot-user-mode/output/instruction/1783362')
-rw-r--r--results/classifier/zero-shot-user-mode/output/instruction/178336253
1 files changed, 53 insertions, 0 deletions
diff --git a/results/classifier/zero-shot-user-mode/output/instruction/1783362 b/results/classifier/zero-shot-user-mode/output/instruction/1783362
new file mode 100644
index 000000000..fe3bb007f
--- /dev/null
+++ b/results/classifier/zero-shot-user-mode/output/instruction/1783362
@@ -0,0 +1,53 @@
+instruction: 0.494
+runtime: 0.283
+syscall: 0.223
+
+
+
+qemu-user: mmap should return failure (MAP_FAILED, -1) instead of success (NULL, 0) when len==0
+
+As shown in https://github.com/beehive-lab/mambo/issues/19#issuecomment-407420602, with len==0 mmap returns success (NULL, 0) instead of failure (MAP_FAILED, -1) in a x86_64 host executing a ELF 64-bit LSB executable, ARM aarch64 binary.
+
+Steps to reproduce the bug:
+
+- (cross-)compile the attached source file:
+
+$ aarch64-linux-gnu-gcc -static -std=gnu99 -lpthread test/mmap_qemu.c -o mmap_qemu
+
+- Execute in a x86_64 host with qemu-user and qemu-user-binfmt:
+
+$ ./mmap_qemu
+alloc: 0
+MAP_FAILED: -1
+errno: 0
+mmap_qemu: test/mmap_qemu.c:15: main: Assertion `alloc == MAP_FAILED' failed.
+qemu: uncaught target signal 6 (Aborted) - core dumped
+Aborted (core dumped)
+
+- Execute in a ARM host without any additional dependecy:
+
+$ ./mmap_qemu
+alloc: -1
+MAP_FAILED: -1
+errno: 22
+
+The bug is present in Fedora:
+
+$ qemu-aarch64 --version
+qemu-aarch64 version 2.11.2(qemu-2.11.2-1.fc28)
+Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
+$ uname -r
+4.17.7-200.fc28.x86_64
+
+And also in Ubuntu:
+
+$ qemu-aarch64 --version
+qemu-aarch64 version 2.12.0 (Debian 1:2.12+dfsg-3ubuntu3)
+Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
+$ uname -r
+4.15.0-23-generic
+
+Possibly related to:
+
+- https://lists.freebsd.org/pipermail/freebsd-hackers/2009-July/029109.html
+- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203852
\ No newline at end of file