Debian Bug report logs - #860393
Segfaults on startup

version graph

Package: slashem-gtk; Maintainer for slashem-gtk is Debian Games Team <pkg-games-devel@lists.alioth.debian.org>; Source for slashem-gtk is src:slashem (PTS, buildd, popcon).

Reported by: Enrico Zini <enrico@debian.org>

Date: Sat, 15 Apr 2017 20:39:01 UTC

Severity: serious

Found in version slashem/0.0.7E7F3-8

Fixed in version slashem/0.0.7E7F3-9

Done: Markus Koschany <apo@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Games Team <pkg-games-devel@lists.alioth.debian.org>:
Bug#860393; Package slashem-gtk. (Sat, 15 Apr 2017 20:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Enrico Zini <enrico@debian.org>:
New Bug report received and forwarded. Copy sent to Debian Games Team <pkg-games-devel@lists.alioth.debian.org>. (Sat, 15 Apr 2017 20:39:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Enrico Zini <enrico@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Segfaults on startup
Date: Sat, 15 Apr 2017 22:35:38 +0200
[Message part 1 (text/plain, inline)]
Package: slashem-gtk
Version: 0.0.7E7F3-8+b1
Severity: serious

Hello,

I installed slashem-gtk, tried to run it and got a segfault:

   # apt install slashem-gtk
   $ slashem-gtk 
   Segmentation fault

   # apt install slashem-gtk-dbgsym
   $ gdb --args slashem-gtk
   (gdb) run
   Starting program: /usr/games/slashem-gtk 
   [Thread debugging using libthread_db enabled]
   Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
   Warning: cannot write scoreboard file record
   
   Program received signal SIGSEGV, Segmentation fault.
   0x000055c0336ec1d7 in nhext_xdrio_create ()
   (gdb) where
   #0  0x000055c0336ec1d7 in nhext_xdrio_create ()
   #1  0x000055c0336ea8a3 in nhext_init ()
   #2  0x000055c0336e5edc in win_proxy_init ()
   #3  0x000055c0336e3064 in GTK_proxy_init_nhwindows ()
   #4  0x000055c0335442c7 in main ()
   (gdb) 


I'm also attaching the output of

   $ strace -f -o /tmp/slashem.strace slashem-gtk
   

Enrico


-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages slashem-gtk depends on:
ii  libatk1.0-0          2.22.0-1
ii  libc6                2.24-9
ii  libcairo2            1.14.8-1
ii  libfontconfig1       2.11.0-6.7+b1
ii  libfreetype6         2.6.3-3.1
ii  libgdk-pixbuf2.0-0   2.36.5-2
ii  libglib2.0-0         2.50.3-2
ii  libgtk2.0-0          2.24.31-2
ii  libncurses5          6.0+20161126-1
ii  libpango-1.0-0       1.40.4-1
ii  libpangocairo-1.0-0  1.40.4-1
ii  libpangoft2-1.0-0    1.40.4-1
ii  libtinfo5            6.0+20161126-1
ii  slashem-common       0.0.7E7F3-8+b1

slashem-gtk recommends no packages.

slashem-gtk suggests no packages.

-- no debconf information
[slashem.strace (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Games Team <pkg-games-devel@lists.alioth.debian.org>:
Bug#860393; Package slashem-gtk. (Sat, 15 Apr 2017 21:51:02 GMT) (full text, mbox, link).


Acknowledgement sent to Chris Lamb <lamby@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Games Team <pkg-games-devel@lists.alioth.debian.org>. (Sat, 15 Apr 2017 21:51:02 GMT) (full text, mbox, link).


Message #10 received at 860393@bugs.debian.org (full text, mbox, reply):

From: Chris Lamb <lamby@debian.org>
To: 860393@bugs.debian.org
Cc: Enrico Zini <enrico@debian.org>
Subject: Re: Segfaults on startup
Date: Sat, 15 Apr 2017 22:49:51 +0100
Hi,

> Segfaults on startup

I can reproduce this as you describe. However, rebuilding the package
locally does not result in binaries that segfault.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Games Team <pkg-games-devel@lists.alioth.debian.org>:
Bug#860393; Package slashem-gtk. (Mon, 17 Apr 2017 16:21:05 GMT) (full text, mbox, link).


Acknowledgement sent to Bernhard Übelacker <bernhardu@mailbox.org>:
Extra info received and forwarded to list. Copy sent to Debian Games Team <pkg-games-devel@lists.alioth.debian.org>. (Mon, 17 Apr 2017 16:21:05 GMT) (full text, mbox, link).


Message #15 received at 860393@bugs.debian.org (full text, mbox, reply):

From: Bernhard Übelacker <bernhardu@mailbox.org>
To: 860393@bugs.debian.org, Enrico Zini <enrico@debian.org>, Chris Lamb <lamby@debian.org>
Subject: Re: Segfaults on startup
Date: Mon, 17 Apr 2017 18:19:22 +0200
[Message part 1 (text/plain, inline)]
Hello,
just tried if I can reproduce the issue.

I think this is a again a case of a pointer truncation by default
int for a pointer returning function.


First patch is just to build with debug information to make the
automatic dbgsym packages helpful.

The second patch adds some includes to get prototypes for alloc function.
This is also warned about in the current amd64 build log:
../win/proxy/nhext.c:36:39: warning: implicit declaration of function 'alloc' [-Wimplicit-function-declaration]
     nhext_connection.in = (NhExtXdr *)alloc(sizeof(NhExtXdr));
                                       ^~~~~

The third patch adds the prototype into a header file for nh_option_get_boolopt.

With these applied at least the user interface can start without crashing.
The build shows another 58 "warning: implicit declaration of function", that
may crash later.

Kind regards,
Bernhard
[0001-Compile-with-debug-information-to-make-dbgsym-packag.patch (text/x-patch, attachment)]
[0002-Avoid-pointer-truncation-because-of-default-int-retu.patch (text/x-patch, attachment)]
[0003-Avoid-pointer-truncation-because-of-default-int-retu.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Games Team <pkg-games-devel@lists.alioth.debian.org>:
Bug#860393; Package slashem-gtk. (Sun, 30 Apr 2017 17:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to Markus Koschany <apo@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Games Team <pkg-games-devel@lists.alioth.debian.org>. (Sun, 30 Apr 2017 17:51:03 GMT) (full text, mbox, link).


Message #20 received at 860393@bugs.debian.org (full text, mbox, reply):

From: Markus Koschany <apo@debian.org>
To: Bernhard Übelacker <bernhardu@mailbox.org>
Cc: 860393@bugs.debian.org
Subject: Re: Segfaults on startup
Date: Sun, 30 Apr 2017 19:47:01 +0200
[Message part 1 (text/plain, inline)]
Control: tags -1 pending

On Mon, 17 Apr 2017 18:19:22 +0200 =?UTF-8?Q?Bernhard_=c3=9cbelacker?=
<bernhardu@mailbox.org> wrote:
> Hello,
> just tried if I can reproduce the issue.
> 
> I think this is a again a case of a pointer truncation by default
> int for a pointer returning function.
> 
> 
> First patch is just to build with debug information to make the
> automatic dbgsym packages helpful.
> 
> The second patch adds some includes to get prototypes for alloc function.
> This is also warned about in the current amd64 build log:
> ../win/proxy/nhext.c:36:39: warning: implicit declaration of function 'alloc' [-Wimplicit-function-declaration]
>      nhext_connection.in = (NhExtXdr *)alloc(sizeof(NhExtXdr));
>                                        ^~~~~
> 
> The third patch adds the prototype into a header file for nh_option_get_boolopt.
> 
> With these applied at least the user interface can start without crashing.
> The build shows another 58 "warning: implicit declaration of function", that
> may crash later.
> 

Hi,

thank you again for your analysis and your patches. I think this issue
was already reported upstream seven years ago [1] but since upstream
development stopped a while ago we haven't seen an update yet. I'm sure
if you were able to address the remaining issue a lot of people would
appreciate it. Nevertheless thanks for the patches so far, the GTK
version appears to be usable again and I have just uploaded a new revision.

Regards,

Markus

[1] https://sourceforge.net/p/slashem/bugs/955/

[signature.asc (application/pgp-signature, attachment)]

Added tag(s) pending. Request was from Markus Koschany <apo@debian.org> to 860393-submit@bugs.debian.org. (Sun, 30 Apr 2017 17:51:03 GMT) (full text, mbox, link).


Reply sent to Markus Koschany <apo@debian.org>:
You have taken responsibility. (Sun, 30 Apr 2017 18:06:06 GMT) (full text, mbox, link).


Notification sent to Enrico Zini <enrico@debian.org>:
Bug acknowledged by developer. (Sun, 30 Apr 2017 18:06:06 GMT) (full text, mbox, link).


Message #27 received at 860393-close@bugs.debian.org (full text, mbox, reply):

From: Markus Koschany <apo@debian.org>
To: 860393-close@bugs.debian.org
Subject: Bug#860393: fixed in slashem 0.0.7E7F3-9
Date: Sun, 30 Apr 2017 18:04:11 +0000
Source: slashem
Source-Version: 0.0.7E7F3-9

We believe that the bug you reported is fixed in the latest version of
slashem, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 860393@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Markus Koschany <apo@debian.org> (supplier of updated slashem package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 30 Apr 2017 19:04:41 +0200
Source: slashem
Binary: slashem slashem-common slashem-sdl slashem-x11 slashem-gtk
Architecture: source
Version: 0.0.7E7F3-9
Distribution: unstable
Urgency: medium
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Changed-By: Markus Koschany <apo@debian.org>
Description:
 slashem    - variant of Nethack
 slashem-common - files common to all slashem-packages
 slashem-gtk - variant of Nethack (Gtk window port)
 slashem-sdl - variant of Nethack (SDL window port)
 slashem-x11 - variant of Nethack (X11 window port)
Closes: 860393
Changes:
 slashem (0.0.7E7F3-9) unstable; urgency=medium
 .
   * Team upload.
   * Add pointer-truncation-bug-860393.patch and try to prevent the user
     interface from crashing. Thanks to Bernhard Übelacker. (Closes: #860393)
   * slashem-common: Fix Lintian error init.d-script-needs-depends-on-lsb-base.
   * Add enable-debug-symbols.patch and make the -dbgsym packages useful. Thanks
     to Bernhard Übelacker for the patch.
Checksums-Sha1:
 69670a03f4afa3ba5dd2841d6432a9e2bf399532 2534 slashem_0.0.7E7F3-9.dsc
 41cd44cf21774010e05f94dca1903a6b937880e5 31196 slashem_0.0.7E7F3-9.debian.tar.xz
 394d7c5c23453e79ca2d2b72adaea4d3aae8f803 14749 slashem_0.0.7E7F3-9_amd64.buildinfo
Checksums-Sha256:
 a4033d23266d72123c3231773095acf0e2893ded749e5525121309aa19e6efa0 2534 slashem_0.0.7E7F3-9.dsc
 03bcaa50b62e2b23a36c4c4ba07385b1d38aadfc6dab26410ecf14a5f0e2ceea 31196 slashem_0.0.7E7F3-9.debian.tar.xz
 cf691f1561c52ae3f057a22196413b4d3df0c05a63434d20b3f61d32b180e475 14749 slashem_0.0.7E7F3-9_amd64.buildinfo
Files:
 694589fc7f049537ed36b5307daa6e26 2534 games optional slashem_0.0.7E7F3-9.dsc
 c3e021d00f7328a32f08030b6436d393 31196 games optional slashem_0.0.7E7F3-9.debian.tar.xz
 8a490efa8c9c96d60fa1554c3c91fc95 14749 games optional slashem_0.0.7E7F3-9_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKjBAEBCgCNFiEErPPQiO8y7e9qGoNf2a0UuVE7UeQFAlkGIe1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEFD
RjNEMDg4RUYzMkVERUY2QTFBODM1RkQ5QUQxNEI5NTEzQjUxRTQPHGFwb0BkZWJp
YW4ub3JnAAoJENmtFLlRO1Hkk6kQALa7QuPRUViUIoiml7Hv2TNtnXt8nzBW5Vi0
WmmNIXzk0a+U0t/n0fUHdlIK6du/+x5buy3fPnV4zJmm1kyDMFHeCVUZl1GJek5O
uexG7/uEJBuxeih8qLBK6KuZqcKq1d5rboDI5h8Tu33b4nYtGL005WB+xWZvMBOV
TQWrAGjrdn/5Wse31ySEHB/CdmjFbYPIJr4xXwFJhCH/dBgVQLpLNTfHwSl5ylc0
IMuNPNChEY3iuADyDVB7hrK6RxFo7SP+pzGL+PVXI4gWcIjLwnaJIRDwYRXECeYc
9vK3O+J/4R091QK6z8oMOHDpNBesktNX7omTOs++I77HhJXUOXzUSI9B4NnKZOmf
+4yge1m3zyrQsSEYjw5uKGyj91d8/19aXU766jrD+3wXEE87yI4g1sP1FJVXL7jF
lXiS54ktQrYvqr2jJAKtGML0qirEPXyCDSbi+E6qYQEBj4bY+25IoxzlNgcs8Yfz
LZmr/qVoevPmemjktmPuzbtBti2uqE0BHgzaIW4l3U2i4LaC10rRD3GV1nP0fdfv
tcV1BhYzPomJMXT3bmZ/EWFd/b3UoSqXRsGFr8Eppt7aMVoojutwAp8UKU/Jmik0
UW/Q1b5lE8qSPNMlD75soqCy2LE2QyLC+PJoAtFtfAp00o5PAxo10HBSbCy6L3Kd
I7xLUE37
=dCib
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 03 Jun 2017 07:28:14 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 11:28:35 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.