Re: Bugreport: Latest CVS checkout of sid: segfault with empty file w/o configuration(?)

Onno Kortmann <[email protected]>
Newsgroups gmane.comp.emulators.sid.devel
Message-ID <[email protected]>
Hi,
> > [...] I tried to run a sid with the following on-line input file:
> > load libmemory.la mem_component_library
> > But sid segfaults. [...]
>
> Of course that shouldn't happen (and doesn't in my build).  You can
> sic a debugger on the binary, and see what's up at the point of crash.
Ok, sorry, my bug report was a bit short, I just thought that I broke it by 
entering a very weird configuration :)

I have now debugged it (somehow the backtrace was of no help, lacked symbols 
and was messed up - so I got to this location iteratively!) until this line 
in compConfig.cxx:

bool
cfgroot_component::register_dso(const string& dso_name, const string& 
_symbol_name)
{
  lt_dlhandle dl_handle = 0;

  // Try ordinary dynamic linking
  dl_handle = lt_dlopen(dso_name.c_str());     <--------

The lt_dlopen segfaults when opening the memory component. For the 
configuration component, lt_dlopen(..) returns zero and the following peek 
into the sid executable itself succeeds.
I installed sid with the default prefix into /usr/local. I 
added /usr/local/sid/sidcomp to the LD_LIBRARY_PATH as a test - this did not 
help. I changed lt_dlopen to lt_dlopenext in this line, I changed the library 
in the configuration file to ".a", ".la", ".so" and even set the full path in 
the configuration file - didn't help either.
Replacing ltdl.c in component/cfgroot/... with a newer one from the debian 
archive (apt-get source libltdl, version 1.5.22) still segfaults.

My system is running kernel 2.6.12/i686 on Debian testing. Libc:
$ /lib/libc.so.6     
GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.3 20051023 (prerelease) (Debian 4.0.2-3).
Compiled on a Linux 2.6.13 system on 2005-11-13.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        linuxthreads-0.10 by Xavier Leroy
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

I installed sid systemwide by doing a make install in a checkout of your CVS, 
in the subdirectory src/sid.

Best regards,

Onno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.