bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Compile & crash on Solaris


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Compile & crash on Solaris
Date: Thu, 2 Jan 2003 22:45:06 +0000
User-agent: Mutt/1.4i

On Thu, Jan 02, 2003 at 10:57:15PM +0100, Holger wrote
> Hi all,
> 
> The main problem is that the programme doesn't run. It crashs almost right
> away.
> 
> As I'm at university I cannot install GNUbg under the default, but
> /home/pub/lib/... . I ran configure with these options:
> ./configure --enable-bearoff=external \
>             --without-sound \
>             --without-gtkextra \
>             --prefix=/home/pub/lib/gnubg-`date +%y%m%d`
> 
> Here is the debug output of two invocations. How should GNUbg be invoked,
> anyway, with --datadir or does it find it by itself?

gnubg should use whatever you've specified with --prefix above as the
default datadir.
> 
> (gdb) run
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xfe6331b4 in strlen ()
> (gdb) bt
> #0  0xfe6331b4 in strlen ()
> #1  0xfe6860f0 in _doprnt ()
> #2  0xfe687eb8 in sprintf ()
> #3  0x6f188 in PathSearch (szFile=0xbdac0 "met/zadeh.xml", szDir=0x0) at
> path.c:86
> #4  0x4ac5c in readMET (pmd=0xffbe9b58, szFileName=0xbdac0 "met/zadeh.xml",
> szDir=0x0)
>     at matchequity.c:1273
> #5  0x4b47c in InitMatchEquity (szFileName=0xbdac0 "met/zadeh.xml",
> szDir=0x0)
>     at matchequity.c:1631
> #6  0x2157c in real_main (closure=0x1, argc=1, argv=0xffbeeb84) at
> gnubg.c:6352
> #7  0x21b40 in main (argc=1, argv=0xffbeeb84) at gnubg.c:6612

This code seems to be the culprit (path.c line 85ff):

    sprintf( pch, "%s/%s", szDir, szFile );
    if( !access( pch, R_OK ) )
        return realloc( pch, strlen( pch ) + 1 );

I guess this should be

   if ( szDir ) {
      sprintf( pch, "%s/%s", szDir, szFile );
      if( !access( pch, R_OK ) )
        return realloc( pch, strlen( pch ) + 1 );
   }

I wonder why I works on all other platforms?!

> ---
> 
> (gdb) run -datadir=/home/pub/lib/gnubg-030102/share/gnubg
> Starting program: /home/pub/lib/gnubg-030102/bin/gnubg
> -datadir=/home/pub/lib/gnubg-030102/share/gnubg
> warning: Unable to find dynamic linker breakpoint function.
> warning: GDB will be unable to debug shared library initializers
> warning: and track explicitly loaded dynamic code.
> GNU Backgammon 0.12  Copyright 1999, 2000, 2001, 2002 Gary Wong.
> GNU Backgammon is free software, covered by the GNU General Public License
> version 2, 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 GNU Backgammon.  Type "show warranty"
> for
> details.
> ld.so.1: /home/pub/lib/gnubg-030102/bin/gnubg: fatal: relocation error: file
> /home/pub/lib/gnubg-030102/bin/gnubg: symbol xmlCatalogResolve: referenced
> symbol not found

Hmm, something is wrong with your system :-) Or perhaps with your
version of gdb?!

Can you try my fix above and run gnubg outside the debugger?

Jørn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]