This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/14683] New: Static dlopen abort on $ORIGIN


http://sourceware.org/bugzilla/show_bug.cgi?id=14683

             Bug #: 14683
           Summary: Static dlopen abort on $ORIGIN
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
        AssignedTo: unassigned@sourceware.org
        ReportedBy: hjl.tools@gmail.com
    Classification: Unclassified


Created attachment 6672
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6672
A testcase

On x86-64, this testcase aborts:

Starting program:
/export/build/gnu/glibc-test/build-x86_64-linux/elf/tst-leaks1-static 
tst-leaks1-static: dl-load.c:438: expand_dynamic_string_token: Assertion
`(l)->l_name[0] == '\0' || 0' failed.

Program received signal SIGABRT, Aborted.
0x0000000000463395 in raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0  0x0000000000463395 in raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x0000000000429df8 in abort () at abort.c:90
#2  0x00000000004253c0 in __assert_fail_base (
    fmt=0x492bc8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x491a50 "(l)->l_name[0] == '\\0' || 0", 
    file=file@entry=0x4918ab "dl-load.c", line=line@entry=438, 
    function=function@entry=0x491b90 <__PRETTY_FUNCTION__.11499>
"expand_dynamic_string_token") at assert.c:92
#3  0x000000000042542e in __assert_fail (
    assertion=assertion@entry=0x491a50 "(l)->l_name[0] == '\\0' || 0", 
    file=file@entry=0x4918ab "dl-load.c", line=line@entry=438, 
    function=function@entry=0x491b90 <__PRETTY_FUNCTION__.11499>
"expand_dynamic_string_token") at assert.c:101
#4  0x000000000041d0f3 in expand_dynamic_string_token (l=0x6c01d0, 
    s=<optimized out>, is_path=0) at dl-load.c:438
#5  0x000000000041d66e in _dl_map_object (loader=loader@entry=0x6c01d0, 
    name=name@entry=0x48d91f "$ORIGIN/tst-leaks1.o", type=type@entry=2, 
    trace_mode=trace_mode@entry=0, mode=mode@entry=-1879048191, nsid=0)
    at dl-load.c:2284
#6  0x0000000000421d98 in dl_open_worker (a=a@entry=0x7fffffffdc40)
    at dl-open.c:226
#7  0x0000000000420326 in _dl_catch_error (
---Type <return> to continue, or q <return> to quit---
    objname=objname@entry=0x7fffffffdc30, 
    errstring=errstring@entry=0x7fffffffdc38, 
    mallocedp=mallocedp@entry=0x7fffffffdc2f, 
    operate=operate@entry=0x421c80 <dl_open_worker>, 
    args=args@entry=0x7fffffffdc40) at dl-error.c:177
#8  0x0000000000421947 in _dl_open (file=0x48d91f "$ORIGIN/tst-leaks1.o", 
    mode=-2147483647, caller_dlopen=0x400cd6 <main+54>, nsid=nsid@entry=0, 
    argc=1, argv=<optimized out>, env=0x7fffffffdf88) at dl-open.c:654
#9  0x0000000000403edc in dlopen_doit (a=a@entry=0x7fffffffde40) at dlopen.c:66
#10 0x0000000000420326 in _dl_catch_error (
    objname=objname@entry=0x6bd470 <last_result+16>, 
    errstring=errstring@entry=0x6bd478 <last_result+24>, 
    mallocedp=mallocedp@entry=0x6bd468 <last_result+8>, 
    operate=operate@entry=0x403e90 <dlopen_doit>, 
    args=args@entry=0x7fffffffde40) at dl-error.c:177
#11 0x000000000040428d in _dlerror_run (
    operate=operate@entry=0x403e90 <dlopen_doit>, 
    args=args@entry=0x7fffffffde40) at dlerror.c:163
#12 0x0000000000403f2e in __dlopen (
    file=file@entry=0x48d91f "$ORIGIN/tst-leaks1.o", mode=mode@entry=1, 
    dl_caller=<optimized out>) at dlopen.c:89
#13 0x00000000004010a9 in dlopen (
    file=file@entry=0x48d91f "$ORIGIN/tst-leaks1.o", mode=mode@entry=1)
---Type <return> to continue, or q <return> to quit---
    at dlopen.c:30
#14 0x0000000000400cd6 in main () at tst-leaks1.c:14
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]