[Pkg-haskell-maintainers] Bug#786727: crashes with segfault when drawLineH is called

John Millikin jmillikin at gmail.com
Fri Jun 5 05:54:02 UTC 2015


I've not been able to reproduce this on my workstation, which is running
Jessie. Installed package versions:

ghc: [7.6.3, 7.8.4, 7.10.1]
c2hs: [0.17.2]
haskell-ncurses: [0.2.7, 0.2.11]
libncursesw5-dev: [5.9+20140913-1+b1]

That stack trace posted in the OP is suspicious. It looks like drawBorder
is being called somehow, but there is no path for the posted code snippet
to reach drawBorder. This makes me believe the stack is getting corrupted.

The only change between 0.2.7 and 0.2.11 that seems related is
08137f194f66796a68bf38886d3944caf7b9d08e, which added support for
c2hs>=0.18.2 by adding ifdefs for some new pointer semantics. I believe
this change is semantically a no-op, but there might be something going on
in the FFI code that I'm not aware of.

What version of c2hs are you using? I'll try building with that to see if
it triggers the issue for me.


On Sun, May 24, 2015 at 4:00 PM, Joey Hess <id at joeyh.name> wrote:

> Package: libghc-ncurses-dev
> Version: 0.2.11-1+b1
> Severity: normal
>
> This program crashes with a segfault.
>
> import UI.NCurses
> main = runCurses $ do
>         w <- defaultWindow
>         updateWindow w $ do
>                 drawLineH (Just (Glyph ' ' [])) 80
>
> This didn't used to happen; the library was working when I wrote scroll
> earlier
> this spring. Something, perrhaps the new version of C ncurses, or the
> upgrade
> from ncurses-0.2.7 to 0.2.11, or the update from ghc 7.6.3 to 7.8.4, must
> have
> broken it.
>
> FWIW, I get the same crash if I install ncurses with cabal.
>
> (gdb) bt
> #0  __memcpy_sse2_unaligned ()
>     at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:33
> #1  0x0000000000415ede in ncurseszm0zi2zi11_UIziNCurses_drawBorder3_info ()
> #2  0x0000000000000000 in ?? ()
>
> -- System Information:
> Debian Release: stretch/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'stable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages libghc-ncurses-dev depends on:
> ii  ghc [libghc-transformers-dev-0.3.0.0-6458c]      7.8.4-6
> ii  libc6                                            2.19-18
> pn  libghc-base-dev-4.7.0.2-bfd89                    <none>
> pn  libghc-containers-dev-0.5.5.1-d4bd8              <none>
> ii  libghc-text-dev [libghc-text-dev-1.1.1.3-1cb5a]  1.1.1.3-2+b2
> ii  libncurses5-dev                                  5.9+20150516-2
> ii  libncursesw5                                     5.9+20150516-2
> ii  libncursesw5-dev                                 5.9+20150516-2
> ii  libtinfo5                                        5.9+20150516-2
>
> libghc-ncurses-dev recommends no packages.
>
> Versions of packages libghc-ncurses-dev suggests:
> ii  libghc-ncurses-doc   0.2.11-1
> pn  libghc-ncurses-prof  <none>
>
> -- no debconf information
>
> --
> see shy jo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20150604/3a5e872f/attachment-0001.html>


More information about the Pkg-haskell-maintainers mailing list