From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by sourceware.org (Postfix) with ESMTPS id 04B183857836 for ; Fri, 28 May 2021 18:02:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 04B183857836 Received: by mail-qk1-x732.google.com with SMTP id c124so179503qkd.8 for ; Fri, 28 May 2021 11:02:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7+390WpyqZa5mwRsWPJPi/2hXoGpfPyUieplfoDWqWI=; b=DJVxO56vArLRUZ44GIJXhLRpHfQwryQyix6cKcYM2RREoYdaHfwMTRPrHNEW0H/18v 4z9Phwe0Sx/fSyWKBUWjPwHZZpmTw+APTRTWagODYua72jPMFkRUvOpEGmYUosBzMc0X NAhKkqFSnShazwzf8qfFFDTpv8EVOnEpKnxJRTaWmQu/hETdkhvT2KXz4crxUw6eRXpx t9zyfibqPB83nFfQg9yfgqYCYhMtjWgWo63nX56cWFMmhiyk9gHK1tAK3aAjMfRURV2L EPwyounq30b1xvrkgS/60zl7J7a3/f+3onB7CJaV8XlWpV8wcdcBudQhIyS1VPViLyor DmFw== X-Gm-Message-State: AOAM5318BT/pHcg9mm3aVX98yi/FT7Ukl4fpVA04jF/xpjtYXW/Qt4vh k1yW+0Ir1MTa0aUJQZnDi5ao5t3o1O6UZg== X-Google-Smtp-Source: ABdhPJw8L+QMmvpTXSz8pEn/wMO7SOGRc0jJSSPgrBzus0WQzMV139LMPcg2ZVDwhtaJsGXQFss35A== X-Received: by 2002:a05:620a:16d8:: with SMTP id a24mr5158045qkn.34.1622224944276; Fri, 28 May 2021 11:02:24 -0700 (PDT) Received: from [192.168.1.4] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id p3sm3781707qti.31.2021.05.28.11.02.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 May 2021 11:02:23 -0700 (PDT) Subject: Re: [RFC][PATCH v10 5/7] Implement dlmopen RTLD_SHARED flag (bug 22745) From: Adhemerval Zanella To: Vivek Das Mohapatra , libc-alpha@sourceware.org References: <20210322154111.24798-1-vivek@collabora.com> <20210322154111.24798-6-vivek@collabora.com> Message-ID: <982a4b32-30b0-5112-53dd-2bdc8319ee63@linaro.org> Date: Fri, 28 May 2021 15:02:21 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 18:02:26 -0000 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=, mode=, 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=, mode=, 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=, args=) at dl-error-skeleton.c:208 > #3 0x00007ffff7f0f80f in __GI__dl_catch_error (objname=0x7fffffffcb30, errstring=0x7fffffffcb38, mallocedp=0x7fffffffcb2f, operate=, args=) at dl-error-skeleton.c:227 > #4 0x00007ffff7fbf776 in _dlerror_run (operate=operate@entry=0x7ffff7fbf230 , args=args@entry=0x7fffffffcb70) at dlerror.c:142 > #5 0x00007ffff7fbf306 in __dlopen (file=, mode=) 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
, 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
, argc=2, argv=0x7fffffffd5c0, init=, fini=, rtld_fini=, 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.