Bug 245035 - Dynamical linker fails to load libs created with older gcc, crash.
Dynamical linker fails to load libs created with older gcc, crash.
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
7
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-20 13:23 EDT by Nikolay Igotti
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 2.6-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-11 11:22:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Nikolay Igotti 2007-06-20 13:23:26 EDT
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 13:23:27 EDT
Created attachment 157482 [details]
tarball with test
Comment 2 Jakub Jelinek 2007-06-21 05:34:55 EDT
This is already fixed in glibc CVS.
2007-06-18  Jakub Jelinek  <jakub@redhat.com>                                  
                                                                               
       * 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@redhat.com>                               
                                                                               
       [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@in.ibm.com>.                     
Comment 3 Nikolay Igotti 2007-06-22 06:31:39 EDT
Any estimations when fix will appear in FC7 updates? 
Comment 4 Fedora Update System 2007-07-09 11:46:18 EDT
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 11:21:54 EDT
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.