summary refs log tree commit diff stats
path: root/results/classifier/user-mode-bugs/1527765
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-05 20:00:38 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-05 20:00:38 +0200
commit96049c939b1916d80532630d63c14e04d5244f1d (patch)
tree7fb9df428f074078e714f1e038210cdff887185a /results/classifier/user-mode-bugs/1527765
parent40bbb77d4dfebff4f99c2f90b2c0db737b0ecc5a (diff)
downloadqemu-analysis-96049c939b1916d80532630d63c14e04d5244f1d.tar.gz
qemu-analysis-96049c939b1916d80532630d63c14e04d5244f1d.zip
lock user-mode and semantic-bugs
Diffstat (limited to 'results/classifier/user-mode-bugs/1527765')
-rw-r--r--results/classifier/user-mode-bugs/152776574
1 files changed, 74 insertions, 0 deletions
diff --git a/results/classifier/user-mode-bugs/1527765 b/results/classifier/user-mode-bugs/1527765
new file mode 100644
index 000000000..ee04a0556
--- /dev/null
+++ b/results/classifier/user-mode-bugs/1527765
@@ -0,0 +1,74 @@
+
+
+sh4: ghc randomly segfaults on qemu-sh4-static
+
+Hello!
+
+I am currently in the process of bootstrapping ghc for the Debian sh4 port and ran into a strange problem with qemu-sh4-static which randomly segfaults when running ghc to compile a Haskell source:
+
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ls
+Main.hi  Main.hs  Setup.hs  ghc-pwd.cabal  ghc.mk
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+Segmentation fault
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+Segmentation fault
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+Segmentation fault
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+Segmentation fault
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+[1 of 1] Compiling Main             ( Main.hs, Main.o )
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+Segmentation fault
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+[1 of 1] Compiling Main             ( Main.hs, Main.o )
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+Segmentation fault
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+[1 of 1] Compiling Main             ( Main.hs, Main.o )
+Bad interface file: /usr/local/lib/sh4-unknown-linux-gnu-ghc-7.10.3/time/dist-install/build/Data/Time/Format/Parse.hi
+    ghc: panic! (the 'impossible' happened)
+  (GHC version 7.10.3 for sh4-unknown-linux):
+	getSymtabName:unknown known-key unique
+<<details unavailable>>
+
+Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
+
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd# ghc Main.hs
+/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+[1 of 1] Compiling Main             ( Main.hs, Main.o )
+Linking Main ...
+root@jessie32:~/ghc-7.8.4/utils/ghc-pwd#
+
+As seen above, compiling a Haskell source code often results in a segfault but simply by retrying to run ghc over and over again, the compile process will eventually succeed and no segfault occurs.
+
+I have created a tarball which contains the sh4 chroot from the example above which also includes ghc, gcc and the source code in question (in /root/ghc-7.8.4/utils/ghc-pwd). To test, it's probably a good idea to replace the qemu-sh4-static binary in /usr/bin with a current git snapshot (which I tried but didn't help).
+
+> http://users.physik.fu-berlin.de/~glaubitz/sid-sh4-sbuild-ghc.tgz
+
+In case anyone wants to try ghc with their own sh4 chroot, here's my version of ghc:
+
+> https://people.debian.org/~glaubitz/sh4-unknown-linux-gnu-ghc-7.10.3.tar.gz
+
+Just extract in the chroot of the sh4 chroot.
+
+Please note, that it might be advisable on sh4 to apply the patches from these two bug reports as otherwise qemu-sh4-static won't work properly on sh4 and misses syscall 186:
+
+> https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/1254824
+> https://bugs.launchpad.net/qemu/+bug/1516408
+
+The above issue is reproducible with the two patches applied and without. It's also reproducible with both libc6 2.19 and 2.21 in the chroot. Thus, I am currently out of ideas what else to test.
+
+Cheers,
+Adrian
\ No newline at end of file