3.3.1.2 dumps core on bad "-e" commands

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

3.3.1.2 dumps core on bad "-e" commands

Post by filbo »

Code: Select all

$ gdb ./rocksndiamonds 
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/share/games/rocksndiamonds/downloads/src/rocksndiamonds-3.3.1.2/rocksndiamonds...done.
(gdb) run -e "dump tae foo"
Starting program: /usr/share/games/rocksndiamonds/downloads/src/rocksndiamonds-3.3.1.2/rocksndiamonds -e "dump tae foo"
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) where
#0  0x0000000000000000 in ?? ()
#1  0x000000000049ebdc in getFontWidth (font_nr=3) at text.c:144
#2  0x000000000040d700 in DisplayExitMessage (format=0x52f43f "unrecognized command '%s'", ap=0x7fffffffe340)
    at init.c:6282
#3  0x00000000004aec49 in Error (mode=12, format=0x52f43f "unrecognized command '%s'") at misc.c:1052
#4  0x000000000040bbee in Execute_Command (command=0x7fffffffe918 "dump tae foo") at init.c:5354
#5  0x000000000040d947 in OpenAll () at init.c:6350
#6  0x00000000004034b8 in main (argc=3, argv=0x7fffffffe5d8) at main.c:5602
I didn't try to dig deeper. I'm guessing that some font initialization hasn't been done by the time you're parsing command-line args, so either you have to display error messages in text, or rearrange the order of startup.

3.3.0.1 fails gracefully:

Code: Select all

$ rocksndiamonds-bin -e "dump tae foo"

rocksndiamonds-bin: unrecognized command 'dump tae foo'
rocksndiamonds-bin: Try option '--help' for more information.
rocksndiamonds-bin: aborting
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 3.3.1.2 dumps core on bad "-e" commands

Post by Holger »

Ouch, that's nasty. Just easily reproduced this bug in 3.3.1.2. :-o

Apparently you're right that this bug was caused by some changes in startup code.

Fortunately, this problem does not exist anymore in the current development version (and should therefore be fixed in the next release version).

Thanks again for reporting this bug!
Post Reply