Current-Users archive

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

macppc __builtin_return_address crash in ld.elf_so on Xorg

Hi all,

Today's -current userland with yesterday's kernel seem to build and
run fine on macppc, but Xorg segfaults when it tries to dynamically
load a library:

# gdb X
GNU gdb 6.5
Copyright (C) 2006 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 "powerpc--netbsd"...(no debugging symbols found)

(gdb) run
Starting program: /usr/pkg/bin/X 

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: UNKNOWN 
Current Operating System: NetBSD 4.99.64 NetBSD 4.99.64 
(GENERIC) #0: Fri Jun 13 17:59:17 CEST 2008 
Build Date: 14 June 2008
        Before reporting problems, check
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun 14 22:22:09 2008
(==) Using config file: "/etc/X11/xorg.conf"

Program received signal SIGSEGV, Segmentation fault.
dlsym (handle=0xfffffffe, name=0xefb09e40 "pcidataModuleData")
    at /usr/src/libexec/ld.elf_so/rtld.c:825
825                     retaddr = __builtin_return_address(0); /* __GNUC__ only 
(gdb) bt
#0  dlsym (handle=0xfffffffe, name=0xefb09e40 "pcidataModuleData")
    at /usr/src/libexec/ld.elf_so/rtld.c:825
#1  0x01862d94 in DLFindSymbol ()
#2  0x0186016c in LoaderSymbol ()
#3  0x018620fc in LoaderListDirs ()
#4  0x018627fc in LoadModule ()
#5  0x0185cb94 in xf86LoadModules ()
#6  0x0185ec4c in InitOutput ()
#7  0x01823ec8 in main ()
(gdb) l
820             switch ((intptr_t)handle) {
821             case (intptr_t)NULL:
822             case (intptr_t)RTLD_NEXT:
823             case (intptr_t)RTLD_DEFAULT:
824             case (intptr_t)RTLD_SELF:
825                     retaddr = __builtin_return_address(0); /* __GNUC__ only 
826                     if ((obj = _rtld_obj_from_addr(retaddr)) == NULL) {
827                             _rtld_error("Cannot determine caller's shared 
828                             return NULL;
829                     }

Simple (probably naive) test programs that simply call
__builtin_return_address(0) or call dlopen followed by dlsym
do not crash.

Anyone have any idea what could be wrong here?

"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: pgpympSpCgFYs.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index