Bug 450785 - SDL_mixer has badly named global variables, kills freeciv.
Summary: SDL_mixer has badly named global variables, kills freeciv.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: SDL_mixer
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Brian Pepple
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-11 00:12 UTC by David Woodhouse
Modified: 2009-07-14 17:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-14 17:48:17 UTC


Attachments (Terms of Use)

Description David Woodhouse 2008-06-11 00:12:26 UTC
freeciv crashes on startup, because something scribbles on its global 'tileset'
variable:

Program received signal SIGSEGV, Segmentation fault.
tileset_init (t=0x0) at tilespec.c:4813
4813	  t->sprites.city.occupied = NULL;
(gdb) p t
$12 = (struct tileset *) 0x0
(gdb) p tileset
$13 = (struct tileset *) 0x0


This turns out to be because open_file() in timidity/common.c is calling
strncpy(current_filename, filename, 1023) -- but civclient has its own variable
called 'current_filename', which is just a char *, and so we're scribbling on
1023 bytes of stuff we shouldn't be.

Hardware watchpoint 2: tileset

Old value = (struct tileset *) 0x10254750
New value = (struct tileset *) 0x0
0x0fe6c44c in strncpy (s1=<value optimized out>, s2=<value optimized out>, 
    n=<value optimized out>) at strncpy.c:82
82	    *++s1 = '\0';
(gdb) bt
#0  0x0fe6c44c in strncpy (s1=<value optimized out>, s2=<value optimized out>, 
    n=<value optimized out>) at strncpy.c:82
#1  0x0f8639f8 in open_file (name=0xf874c7c "timidity.cfg", 
    decompress=<value optimized out>, noise_mode=2)
    at /usr/include/bits/string3.h:122
#2  0x0f86f788 in read_config_file (name=<value optimized out>)
    at timidity/timidity.c:63


What kind of name is 'current_filename' for a global variable declared in a
library, anyway?

Comment 1 David Woodhouse 2008-06-11 00:17:16 UTC
civclient works fine once I rename the offending variable, which seems to be
unused except on win32. The bug really does lie with SDL_mixer though, for
polluting the namespace.

Comment 2 Bug Zapper 2009-06-10 01:32:16 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Bug Zapper 2009-07-14 17:48:17 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.