Bug 245035 - Dynamical linker fails to load libs created with older gcc, crash.
Summary: Dynamical linker fails to load libs created with older gcc, crash.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 7
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-20 17:23 UTC by Nikolay Igotti
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: 2.6-4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-11 15:22:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
tarball with test (5.26 KB, application/octet-stream)
2007-06-20 17:23 UTC, Nikolay Igotti
no flags Details

Description Nikolay Igotti 2007-06-20 17:23:26 UTC
Description of problem:

RTLD linker fails to work with programs compiled on older libc releases.
It prevents JDK (especially Netbeans) to work on FC7.

Version-Release number of selected component (if applicable):
FC7

How reproducible:
Attached files with simple test.

Steps to Reproduce:
1. unpack attachment
2 [details]. clean preloaded libs with 'prelink -ua'
3. make run
4. type r in gdb prompt
5. well, enjoy the crash

 Backtrace is like this:

#0  0x00002aaaaaab41bd in _dl_lookup_symbol_x () from /lib64/ld-linux-x86-64.so.2
#1  0x00002aaaaafcf43f in do_sym () from /lib64/libc.so.6
#2  0x00002aaaaacc7104 in dlsym_doit () from /lib64/libdl.so.2
#3  0x00002aaaaaab7fc6 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#4  0x00002aaaaacc750d in _dlerror_run () from /lib64/libdl.so.2
#5  0x00002aaaaacc70ba in dlsym () from /lib64/libdl.so.2
#6  0x00002aaaaaae1792 in on_load ()
   from /net/crawler/export/users/ni81036/dllib/libtest.so
#7  0x0000000000400626 in test (
    lib=0x7fff7f019490 "/net/crawler/export/users/ni81036/dllib/libtest.so")
    at dltst.c:18
#8  0x0000000000400698 in main (argc=2, argv=0x7fff7f019688) at dltst.c:31

  
Actual results:
Crash

Expected results:
No crash

Additional info:
When all system libs get prelinked problem disappears.

Comment 1 Nikolay Igotti 2007-06-20 17:23:27 UTC
Created attachment 157482 [details]
tarball with test

Comment 2 Jakub Jelinek 2007-06-21 09:34:55 UTC
This is already fixed in glibc CVS.
2007-06-18  Jakub Jelinek  <jakub>                                  
                                                                               
       * elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous.      
       Move PT_LOAD checking to...                                             
       (_dl_addr_inside_object): ... here, new function.                       
       * elf/dl-sym.c (do_sym): If not l_contiguous,                           
       call _dl_addr_inside_object.                                            
       * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise.                   
       * dlfcn/dlinfo.c (dlinfo_doit): Likewise.                               
       * elf/dl-open.c (dl_open_worker): Likewise.                             
       (_dl_addr_inside_object): New function if IS_IN_rtld.                   
       * elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no        
       holes are present or are PROT_NONE protected.                           
       * include/link.h (struct link_map): Add l_contiguous field.             
       * sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.   

2007-05-06  Ulrich Drepper  <drepper>                               
                                                                               
       [BZ #4131]                                                              
       * elf/dl-addr.c (_dl_addr): Compare address with actual segment         
       boundaries to work around systems with overlapping binary loading.      
       Based on a patch by Suzuki <suzuki.com>.                     

Comment 3 Nikolay Igotti 2007-06-22 10:31:39 UTC
Any estimations when fix will appear in FC7 updates? 

Comment 4 Fedora Update System 2007-07-09 15:46:18 UTC
glibc-2.6-4 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2007-07-11 15:21:54 UTC
glibc-2.6-4 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.


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