Launchpad has imported 3 comments from the remote bug at
http://sourceware.org/bugzilla/show_bug.cgi?id=13618.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2012-01-23T20:23:48+00:00 Ppluzhnikov-google wrote:

The test is reduced from
https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/919202

Reproduces with current git trunk.

// foo.c
#include <math.h>
int foo (double d) { return floor (d) != 0; }

// bar.c
int bar () { return foo (); }

// main.c
#include <dlfcn.h>
#include <stdio.h>

int
main (int argc, char *argv[])
{
  const char *lib = "./bar.so";
  if (argc > 1) lib = argv[1];
  void *h = dlopen (lib, RTLD_NOW);  // RTLD_LAZY -> no bug
  if (h == 0)
    {
      puts (dlerror ());
      return 1;
    }
  return 0;
}

gcc -fPIC -shared -fno-builtin -o foo.so foo.c -lm &&
gcc -fPIC -shared -o bar.so -Wl,--no-as-needed -lm ./foo.so bar.c &&
gcc -g main.c -ldl

gdb -q ./a.out

Program received signal SIGSEGV, Segmentation fault.
0x0000000000005446 in ?? ()
(gdb) bt
#0  0x0000000000005446 in ?? ()
#1  0x00007ffff7351005 in floor () at 
../sysdeps/x86_64/fpu/multiarch/s_floor.S:26
#2  0x00007ffff7de738f in elf_machine_rela (sym=0x7ffff7338c88, 
skip_ifunc=<optimized out>, reloc_addr_arg=0x7ffff7336008, version=<optimized 
out>, map=0x602af0, 
    reloc=<optimized out>) at ../sysdeps/x86_64/dl-machine.h:302
#3  elf_dynamic_do_Rela (skip_ifunc=<optimized out>, lazy=<optimized out>, 
nrelative=<optimized out>, relsize=<optimized out>, reladdr=<optimized out>, 
map=0x602af0)
    at do-rel.h:146
#4  _dl_relocate_object (scope=0x602e48, reloc_mode=<optimized out>, 
consider_profiling=0) at dl-reloc.c:265
#5  0x00007ffff7deda23 in dl_open_worker (a=0x7fffffffd400) at dl-open.c:338
#6  0x00007ffff7de9686 in _dl_catch_error (objname=0x7fffffffd3f0, 
errstring=0x7fffffffd3f8, mallocedp=0x7fffffffd3ef, operate=0x7ffff7ded7c0 
<dl_open_worker>, 
    args=0x7fffffffd400) at dl-error.c:178
#7  0x00007ffff7ded36c in _dl_open (file=0x40080c "./bar.so", mode=-2147483646, 
caller_dlopen=<optimized out>, nsid=-2, argc=1, argv=0x7fffffffd748, 
env=0x7fffffffd758)
    at dl-open.c:575
#8  0x00007ffff7bd7f26 in dlopen_doit (a=0x7fffffffd610) at dlopen.c:67
#9  0x00007ffff7de9686 in _dl_catch_error (objname=0x7ffff7dda0d0, 
errstring=0x7ffff7dda0d8, mallocedp=0x7ffff7dda0c8, operate=0x7ffff7bd7ec0 
<dlopen_doit>, args=0x7fffffffd610)
    at dl-error.c:178
#10 0x00007ffff7bd84dc in _dlerror_run (operate=0x7ffff7bd7ec0 <dlopen_doit>, 
args=0x7fffffffd610) at dlerror.c:164
#11 0x00007ffff7bd7fc1 in __dlopen (file=<optimized out>, mode=<optimized out>) 
at dlopen.c:88
#12 0x00000000004006f1 in main (argc=1, argv=0x7fffffffd748) at main.c:8

What appears to be happening is that __floor (IFUNC) jumps to *unrelocated*
GOT entry for __get_cpu_features.

Reply at: https://bugs.launchpad.net/glibc/+bug/919202/comments/3

------------------------------------------------------------------------
On 2012-01-24T12:18:44+00:00 Aj-suse wrote:

*** Bug 13580 has been marked as a duplicate of this bug. ***

Reply at: https://bugs.launchpad.net/glibc/+bug/919202/comments/5

------------------------------------------------------------------------
On 2012-01-24T12:19:42+00:00 Aj-suse wrote:

Thanks for the testcase.

Reply at: https://bugs.launchpad.net/glibc/+bug/919202/comments/6


** Changed in: glibc
       Status: Unknown => Confirmed

** Changed in: glibc
   Importance: Unknown => Critical

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/919202

Title:
  [2.15~pre6] regression: crashes in dlopen()

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/919202/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to