summary refs log tree commit diff stats
path: root/gitlab/issues_text/target_missing/host_missing/accel_missing/929
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-05-30 16:52:07 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-05-30 16:52:17 +0200
commit9260319e7411ff8281700a532caa436f40120ec4 (patch)
tree2f6bfe5f3458dd49d328d3a9eb508595450adec0 /gitlab/issues_text/target_missing/host_missing/accel_missing/929
parent225caa38269323af1bfc2daadff5ec8bd930747f (diff)
downloadqemu-analysis-9260319e7411ff8281700a532caa436f40120ec4.tar.gz
qemu-analysis-9260319e7411ff8281700a532caa436f40120ec4.zip
gitlab scraper: download in toml and text format
Diffstat (limited to 'gitlab/issues_text/target_missing/host_missing/accel_missing/929')
-rw-r--r--gitlab/issues_text/target_missing/host_missing/accel_missing/92933
1 files changed, 33 insertions, 0 deletions
diff --git a/gitlab/issues_text/target_missing/host_missing/accel_missing/929 b/gitlab/issues_text/target_missing/host_missing/accel_missing/929
new file mode 100644
index 000000000..45ab9e1f1
--- /dev/null
+++ b/gitlab/issues_text/target_missing/host_missing/accel_missing/929
@@ -0,0 +1,33 @@
+qemu-user syscall clone fails
+Description of problem:
+This seems very similar to the issue reported here (https://bugs.launchpad.net/qemu/+bug/1926996). When attempting to perform the clone syscall, an error of -1 is returned where I would expect it to succeed. Running the same executable outside of qemu works as expected.
+Steps to reproduce:
+1. gcc clone.c
+2. qemu-x86_64 a.out
+Additional information:
+I've tried building with gcc, zig cc, and clang and the output of each works fine when running natively, but running under qemu fails. I originally discovered it when cross compiling to riscv64 but it doesn't seem to be limited to that architecture.
+
+```
+// clone.c
+
+#include <linux/sched.h>
+#include <sched.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+#include <stdio.h>
+
+int main(void) {
+
+  long pid = syscall( SYS_clone, 0, 0, 0, 0, 0 );
+
+  if (pid < 0) {
+    printf( "error %ld\n", pid );
+  } else if (pid == 0) {
+    printf( "child %ld\n", pid );
+  } else {
+    printf( "parent %ld\n", pid );
+  }
+
+  return 0;
+}
+```