[Bug 194611] New: [patch] japanese/nethack34: Fix segfault on FreeBSD/amd64
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Oct 26 14:04:00 UTC 2014
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194611
Bug ID: 194611
Summary: [patch] japanese/nethack34: Fix segfault on
FreeBSD/amd64
Product: Ports Tree
Version: Latest
Hardware: Any
OS: Any
Status: Needs Triage
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: freebsd-ports-bugs at FreeBSD.org
Reporter: CQG00620 at nifty.ne.jp
Created attachment 148666
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=148666&action=edit
A patch for japanese/nethack34.
(1) Fix segfault on FreeBSD/amd64
(2) Uncomment "define USE_XPM" for a default configuration
(3) Install an X resource file for appropriate Japanese font support on X
(4) Remove @dirrm, and use @dir() instead of @dirrmtry/"chmod"/"chown"
(1) Fix segfault on FreeBSD/amd64 (New: patch-include__xwindow.h)
This is not occured without (2).
When a player dies in X mode, jnethack popups an window which shows
the player's final status and a tombstone image (rip.xbm).
But on FreeBSD/amd64, fails to display the image and causes a segmentation
fault.
| root at aquarius-vm:/home/nabe # gdb /usr/local/share/jnethack/jnethack `pgrep
jnethack`
| GNU gdb 6.1.1 [FreeBSD]
| Copyright 2004 Free Software Foundation, Inc.
| GDB is free software, covered by the GNU General Public License, and you are
| welcome to change it and/or distribute copies of it under certain conditions.
| Type "show copying" to see the conditions.
| There is absolutely no warranty for GDB. Type "show warranty" for details.
| This GDB was configured as "amd64-marcel-freebsd"...
| Attaching to program: /usr/local/share/jnethack/jnethack, process 3947
| Reading symbols from /lib/libncurses.so.8...done.
| Loaded symbols for /lib/libncurses.so.8
(snip)
| Reading symbols from /libexec/ld-elf.so.1...done.
| Loaded symbols for /libexec/ld-elf.so.1
| 0x0000000801f8925c in poll () from /lib/libc.so.7
| (gdb) cont
| Continuing.
|
| Program received signal SIGSEGV, Segmentation fault.
| 0x00000008017f52c0 in XmbTextEscapement () from /usr/local/lib/libX11.so.6
| (gdb) where
| #0 0x00000008017f52c0 in XmbTextEscapement () from
/usr/local/lib/libX11.so.6
| #1 0x00000000005bb18c in rip_exposed (w=0x803101200, client_data=0x0,
widget_data=0x7fffffffc410) at ../win/X11/wintext.c:681
| #2 0x000000080154b048 in XtCallCallbacks () from /usr/local/lib/libXt.so.6
| #3 0x00000000005a9556 in Redisplay (w=0x803101200, event=0x7fffffffc410,
region=0x8030a91a0) at ../win/X11/Window.c:127
| #4 0x00000008015583f5 in SendExposureEvent () from /usr/local/lib/libXt.so.6
| #5 0x0000000801558952 in XtDispatchEventToWidget () from
/usr/local/lib/libXt.so.6
| #6 0x0000000801558e4c in _XtDefaultDispatcher () from
/usr/local/lib/libXt.so.6
| #7 0x00000008015580b8 in XtDispatchEvent () from /usr/local/lib/libXt.so.6
| #8 0x00000000005b1622 in x_event (exit_condition=2) at
../win/X11/winmap.c:1842
| #9 0x00000000005ba2ed in display_text_window (wp=0x86dfe0, blocking=1
'\001') at ../win/X11/wintext.c:270
| #10 0x00000000005ab708 in X11_display_nhwindow (window=4, blocking=1 '\001')
at ../win/X11/winX.c:801
| #11 0x000000000046b9f3 in done (how=0) at end.c:1151
| #12 0x0000000000469acb in done_in_by (mtmp=0x803310a40) at end.c:317
| #13 0x00000000004ade78 in mdamageu (mtmp=0x803310a40, n=4) at mhitu.c:2740
| #14 0x00000000004ab2d2 in hitmu (mtmp=0x803310a40, mattk=0x829f00) at
mhitu.c:2134
| #15 0x00000000004a71fe in mattacku (mtmp=0x803310a40) at mhitu.c:807
| #16 0x00000000004d0159 in dochug (mtmp=0x803310a40) at monmove.c:614
| #17 0x00000000004cdde6 in dochugw (mtmp=0x803310a40) at monmove.c:110
| #18 0x00000000004c2de4 in movemon () at mon.c:692
| #19 0x0000000000404cba in moveloop () at allmain.c:94
| #20 0x000000000059f36d in main (argc=2, argv=0x7fffffffd158) at
../sys/unix/unixmain.c:321
| (gdb)
This is a jnethack's specific problem, and not occured on FreeBSD/i386.
To solve the problem, add a missing function prototype to include/xwindow.h.
(2) Uncomment "define USE_XPM" for a default configuration
(Update: patch-include-config.h)
It enables the tombstone image and tileset support.
(3) Install an X resource file for appropriate Japanese font support on X
(Update: Makefile, New: patch-win__X11__JNetHack.ad)
(4) Remove @dirrm, and use @dir() instead of @dirrmtry/"chmod"/"chown"
(Update: pkg-plist patch-sys-unix-Makefile.top)
The latter one replaces my previous "quick fix", and is taken from
games/nethack34. Thanks!
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list