summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_missing/2935.toml
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-05-21 21:21:26 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-05-21 21:21:26 +0200
commit4b927bc37359dec23f67d3427fc982945f24f404 (patch)
tree245449ef9146942dc7fffd0235b48b7e70a00bf2 /gitlab/issues/target_missing/host_missing/accel_missing/2935.toml
parentaa8bd79cec7bf6790ddb01d156c2ef2201abbaab (diff)
downloadqemu-analysis-4b927bc37359dec23f67d3427fc982945f24f404.tar.gz
qemu-analysis-4b927bc37359dec23f67d3427fc982945f24f404.zip
add gitlab issues in toml format
Diffstat (limited to 'gitlab/issues/target_missing/host_missing/accel_missing/2935.toml')
-rw-r--r--gitlab/issues/target_missing/host_missing/accel_missing/2935.toml34
1 files changed, 34 insertions, 0 deletions
diff --git a/gitlab/issues/target_missing/host_missing/accel_missing/2935.toml b/gitlab/issues/target_missing/host_missing/accel_missing/2935.toml
new file mode 100644
index 000000000..7381e523f
--- /dev/null
+++ b/gitlab/issues/target_missing/host_missing/accel_missing/2935.toml
@@ -0,0 +1,34 @@
+id = 2935
+title = "strchrnul detection not suitable for macOS"
+state = "opened"
+created_at = "2025-04-27T09:07:06.985Z"
+closed_at = "n/a"
+labels = []
+url = "https://gitlab.com/qemu-project/qemu/-/issues/2935"
+host-os = "macOS"
+host-arch = "ARM"
+qemu-version = "10.0.0"
+guest-os = "N/A"
+guest-arch = "N/A"
+description = """When qemu is compiled on macOS 15.4, targeting an earlier macOS version (e.g., 15.1), and then run on this earlier macOS version (15.1), it segfaults. This is because:
+
+- the meson test for strchrnul succeeds (the function is present in the library)
+- the strchrnul function is therefore used
+- but that function was introduced in the system's libc in 15.4 only
+
+The root cause for the bug is that the meson test for strchrnul does not include the appropriate header. Indeed, see the documentation for meson on compiler.has_function (https://mesonbuild.com/Compiler-properties.html#does-a-function-exist)
+
+> Note that, on macOS programs can be compiled targeting older macOS versions than the one that the program is compiled on. It can't be assumed that the OS version that is compiled on matches the OS version that the binary will run on.
+> 
+> Therefore when detecting function availability with compiler.has_function(), it is important to specify the correct header in the prefix argument.
+
+The correct fix would be, in qemu's meson.build, to change:
+
+`cc.has_function('strchrnul')`
+
+into `cc.has_function('strchrnul', prefix : '#include <string>')`
+
+This is the recommended best practice and would allow correct detection on all platforms, including macOS."""
+reproduce = """1. Install qemu from Homebrew, which is built on macOS 15.4
+2. Run it on a machine with macOS < 15.4"""
+additional = "n/a"