summary refs log tree commit diff stats
path: root/results/classifier/118/semantic-arm/1704658
diff options
context:
space:
mode:
Diffstat (limited to 'results/classifier/118/semantic-arm/1704658')
-rw-r--r--results/classifier/118/semantic-arm/1704658116
1 files changed, 116 insertions, 0 deletions
diff --git a/results/classifier/118/semantic-arm/1704658 b/results/classifier/118/semantic-arm/1704658
new file mode 100644
index 000000000..5676fa740
--- /dev/null
+++ b/results/classifier/118/semantic-arm/1704658
@@ -0,0 +1,116 @@
+semantic: 0.866
+graphic: 0.865
+performance: 0.843
+assembly: 0.827
+debug: 0.826
+PID: 0.821
+virtual: 0.820
+device: 0.819
+permissions: 0.814
+arm: 0.811
+architecture: 0.802
+register: 0.788
+socket: 0.783
+hypervisor: 0.772
+files: 0.769
+user-level: 0.769
+network: 0.759
+peripherals: 0.758
+KVM: 0.756
+ppc: 0.754
+kernel: 0.753
+boot: 0.739
+TCG: 0.717
+vnc: 0.715
+VMM: 0.701
+risc-v: 0.686
+i386: 0.661
+mistranslation: 0.595
+x86: 0.574
+--------------------
+user-level: 0.963
+x86: 0.293
+debug: 0.133
+virtual: 0.124
+files: 0.120
+TCG: 0.117
+register: 0.019
+PID: 0.016
+semantic: 0.016
+architecture: 0.011
+i386: 0.010
+device: 0.008
+network: 0.004
+assembly: 0.004
+hypervisor: 0.004
+permissions: 0.003
+VMM: 0.003
+socket: 0.003
+performance: 0.003
+vnc: 0.003
+peripherals: 0.002
+boot: 0.002
+KVM: 0.002
+graphic: 0.001
+kernel: 0.001
+risc-v: 0.001
+ppc: 0.001
+mistranslation: 0.001
+arm: 0.001
+
+O_CLOEXEC not handled in dup3 system call in user mode
+
+In qemu user mode, for hppa and sparc64 targets, the parameter of the dup3 is not passed correctly when it contains the O_CLOEXEC flag.
+
+When the attached program runs, the expected output is:
+errno=9=EBADF
+
+How to reproduce on hppa:
+- Compile the program: hppa-linux-gnu-gcc-5 -O -Wall -static testdup3.c -o testdup3-hppa
+- Set environment variables for running qemu-hppa.
+- ~/inst-qemu/2.9.0/bin/qemu-hppa testdup3-hppa
+errno=22=EINVAL
+testdup3.c:54: assertion 'errno == EBADF' failed
+
+How to reproduce on sparc64:
+- Compile the program: sparc64-linux-gnu-gcc-5 -O -Wall -static testdup3.c -o testdup3-sparc64
+- Set environment variables for running qemu-sparc64.
+- ~/inst-qemu/2.9.0/bin/qemu-sparc64 testdup3-sparc64
+errno=22=EINVAL
+testdup3.c:54: assertion 'errno == EBADF' failed
+
+
+
+
+
+
+
+I see this bug for hppa, sparc64.
+I don't see it for m68k, mips, mips64, powerpc, powerpc64.
+Most likely because the binary values of O_CLOEXEC on hppa and sparc64 are different than on other platforms. Looking in the glibc source code:
+
+$ grep -r 'define.*O_CLOEXEC' glibc
+glibc/bits/fcntl.h:# define O_CLOEXEC   0x00400000      /* Set close_on_exec.  */
+glibc/sysdeps/mach/hurd/bits/fcntl.h:# define O_CLOEXEC 0x00400000 /* Set FD_CLOEXEC.  */
+glibc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h:#define __O_CLOEXEC    0x400000 /* Set close_on_exit.  */
+glibc/sysdeps/unix/sysv/linux/bits/fcntl-linux.h:# define __O_CLOEXEC   02000000
+glibc/sysdeps/unix/sysv/linux/bits/fcntl-linux.h:# define O_CLOEXEC     __O_CLOEXEC     /* Set close_on_exec.  */
+glibc/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h:#define __O_CLOEXEC     010000000 /* Set close_on_exec.  */
+glibc/sysdeps/unix/sysv/linux/microblaze/bits/fcntl.h:#define __O_CLOEXEC        02000000       /* Set close_on_exec.  */
+glibc/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h:#define __O_CLOEXEC    010000000 /* Set close_on_exec.  */
+glibc/sysdeps/nacl/bits/fcntl.h:# define O_CLOEXEC      02000000        /* Set close_on_exec.  */
+
+So, what's missing is probably that the O_CLOEXEC of the target platform gets mapped to O_CLOEXEC of the host platform, during the dup3 system call emulation.
+
+The behaviour in qemu-2.10 is the same as in qemu-2.9.
+
+The behaviour in qemu-2.11 is the same as in qemu-2.9.
+
+Should be fixed by http://patchwork.ozlabs.org/patch/849226/
+
+
+Fix has been included here:
+https://git.qemu.org/?p=qemu.git;a=commitdiff;h=10fa993aae539fa8d0da1d
+
+Confirmed: It's fixed in qemu-2.12.
+