[RFC][PATCH v10 5/7] Implement dlmopen RTLD_SHARED flag (bug 22745)
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri May 28 18:02:21 GMT 2021
On 28/05/2021 14:32, Adhemerval Zanella wrote:
>>
>> elf/dl-sym.c: dlsym, dlvsym must be able to resolve symbols via proxies
>
> With this patch I am seeing some regression with binutils with and
> without -z unique support:
>
> FAIL: elf/tst-dlmopen-dlerror
> FAIL: elf/tst-tls-ie-dlmopen
>
> $ ./debugglibc.sh -- elf/tst-dlmopen-dlerror --direct
> [...]
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7fdf44f in _dl_open (file=<optimized out>, mode=<optimized out>, caller_dlopen=0x7ffff7dd1383, nsid=-2, argc=2, argv=0x7fffffffd5c0, env=0x7fffffffd5d8) at dl-open.c:995
> 995 GL(dl_ns)[nsid].libc_map = NULL;
> (gdb) bt
> #0 0x00007ffff7fdf44f in _dl_open (file=<optimized out>, mode=<optimized out>, caller_dlopen=0x7ffff7dd1383, nsid=-2, argc=2, argv=0x7fffffffd5c0, env=0x7fffffffd5d8) at dl-open.c:995
> #1 0x00007ffff7fbf288 in dlopen_doit (a=a@entry=0x7fffffffcb70) at dlopen.c:66
> #2 0x00007ffff7f0f769 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffcad0, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:208
> #3 0x00007ffff7f0f80f in __GI__dl_catch_error (objname=0x7fffffffcb30, errstring=0x7fffffffcb38, mallocedp=0x7fffffffcb2f, operate=<optimized out>, args=<optimized out>) at dl-error-skeleton.c:227
> #4 0x00007ffff7fbf776 in _dlerror_run (operate=operate@entry=0x7ffff7fbf230 <dlopen_doit>, args=args@entry=0x7fffffffcb70) at dlerror.c:142
> #5 0x00007ffff7fbf306 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
> #6 0x00007ffff7dd1383 in ?? ()
> #7 0x000000000000002b in ?? ()
> #8 0x00007fffffffcbd0 in ?? ()
> #9 0x00007ffff7dd1370 in ?? ()
> #10 0x0000000000402595 in do_test () at tst-dlmopen-dlerror.c:43
> #11 0x0000000000402d75 in support_test_main (argc=1, argc@entry=2, argv=0x7fffffffd5c8, argv@entry=0x7fffffffd5c0, config=config@entry=0x7fffffffd450) at support_test_main.c:403
> #12 0x0000000000402385 in main (argc=argc@entry=2, argv=argv@entry=0x7fffffffd5c0) at ../support/test-driver.c:168
> #13 0x00007ffff7dff407 in __libc_start_call_main (main=main@entry=0x402350 <main>, argc=argc@entry=2, argv=argv@entry=0x7fffffffd5c0) at ../sysdeps/nptl/libc_start_call_main.h:58
> #14 0x00007ffff7dff4b8 in __libc_start_main_impl (main=0x402350 <main>, argc=2, argv=0x7fffffffd5c0, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd5b8)
> at ../csu/libc-start.c:411
> #15 0x0000000000402411 in _start () at ../sysdeps/x86_64/start.S:116
>
The 'loader' GL(dl_ns)[nsid].libc_map points to a read-only memory segment,
I haven't debug it further.
More information about the Libc-alpha
mailing list