From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#46256: [feature/native-comp] AOT eln files ignored if run from build tree Date: Mon, 8 Mar 2021 15:09:07 +0000 Message-ID: References: <86wnutogrh.fsf@gmail.com> <86wnut8fb9.fsf@gmail.com> <861rd1tbpa.fsf@gmail.com> <83pn0km6y3.fsf@gnu.org> <86ft1f8ara.fsf@gmail.com> <83sg5cjdn8.fsf@gnu.org> <83r1kwjcy2.fsf@gnu.org> <8335x6u9o4.fsf@gnu.org> <83zgzesrku.fsf@gnu.org> <83tupms4mp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000e13aca05bd07d2fa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9561"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andrewjmoreton@gmail.com, 46256@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 08 16:11:26 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJHXZ-0002Na-QE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 16:11:25 +0100 Original-Received: from localhost ([::1]:59846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJHXY-0004la-31 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Mar 2021 10:11:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJHWF-0002aF-12 for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 10:10:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJHWE-0002a7-KU for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 10:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJHWE-0004fg-EE for bug-gnu-emacs@gnu.org; Mon, 08 Mar 2021 10:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Mar 2021 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46256 X-GNU-PR-Package: emacs Original-Received: via spool by 46256-submit@debbugs.gnu.org id=B46256.161521619617939 (code B ref 46256); Mon, 08 Mar 2021 15:10:02 +0000 Original-Received: (at 46256) by debbugs.gnu.org; 8 Mar 2021 15:09:56 +0000 Original-Received: from localhost ([127.0.0.1]:44524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJHW8-0004fH-Ls for submit@debbugs.gnu.org; Mon, 08 Mar 2021 10:09:56 -0500 Original-Received: from mail-oi1-f175.google.com ([209.85.167.175]:37763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJHW6-0004ez-Iq for 46256@debbugs.gnu.org; Mon, 08 Mar 2021 10:09:54 -0500 Original-Received: by mail-oi1-f175.google.com with SMTP id u198so6323042oia.4 for <46256@debbugs.gnu.org>; Mon, 08 Mar 2021 07:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E9iQa31pUFkypccrazHoj/eTiBIBXX7WNfQLHsDWYo8=; b=TTtWBZuizYahx9NEAoFv5Bd3mucuaW0tzSqf889K9T0Bqj4gSu7dS5GSsqyiFdFcN+ b1YY6+/J6Jtp/5xc60/vOgfjz/86Ha1sfQQkABXrdIv0gApM41Yuw3487MUe4VdhkiNx VDCyEAd0QgRT/wKt+8Th6p9grHX36ju4/ZEzM+rRKrruvvcpAU0h+QJw58m63YVqpH0/ Pd/BrRlfxd4FB1YrhNrPpxl8sJpT4PBooXvZHed0tEIYVVX2psaENfKrbQbQeUntNxh6 jaqtBU1fzjs7cv9vUr8pzZ4bgXBzcVwWHKVFk6gyMzB4Zuqf/l4K5gS/27Vp9YXtUCEJ qt9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E9iQa31pUFkypccrazHoj/eTiBIBXX7WNfQLHsDWYo8=; b=ly6I8g/UOa9MVg8vJ7oBJClHYtNsr0/IAR935hOI60VzdLaHFDELVGVlEp96qslGUR kV+qPjqHQ/wIyIKFaeZMvDU+SrCSI24DJ9qQFOS7HLZT7Oh66JmgSBNRvXh30cABLpOT edDMVnwKmpSvU4Xx8nb6hM/tdCAWJJ8ZP9DpP+VcnSZCxII9UiZ8+jhAkSgA1hdBRywT fLiTVTsGt7jQtDkQ7whg6RurxkNdfyygDyEtfEoBdHmtsaPCIstapIS5msr2eWqr4No4 qQuCa8GvkCiQ8MDc4+yaDLLs5ueI2zAmxWVA7rOaVlzEPRCO9711a9z1zImerwTUO9d4 JsAw== X-Gm-Message-State: AOAM531Ze8Y7nIygt6svhdfySs0IIdk5SZ7yn/dIkJRkKFrIc1ykBew3 o05LIteiLc/j5Xva0X0KYJcTNIVCEtOyH8v3xoQ= X-Google-Smtp-Source: ABdhPJy5delomi1D+BwPoYm4580+QwEbsUoa/x++nz45eyVZQgKLhTqT5tPBfEDKllbZFFWhlyNt0eEDON7YsPZVJEI= X-Received: by 2002:aca:aad6:: with SMTP id t205mr17629754oie.122.1615216183942; Mon, 08 Mar 2021 07:09:43 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201841 Archived-At: --000000000000e13aca05bd07d2fa Content-Type: text/plain; charset="UTF-8" On Mon, Mar 8, 2021 at 3:03 PM Andrea Corallo wrote: > Pip Cet writes: > > On Mon, Mar 8, 2021 at 10:14 AM Andrea Corallo wrote: > > Have you modified dynlib_open() to leak the shared object? That's what > > I think might be happening for Eli, so it makes sense to test with a > > double dlopen() call, as I did. > > No, because I failed to understand why calling 'dlopen' two times in a > row on the same filename should make any difference as I expect the > second call to just return the same handle as the first. It does. What changes is that the next time we load the library, the first (leaky) dlopen() will have kept it in memory, so the third and fourth calls to dlopen() would also return the same handle as the first and second calls did. > I'm sure I'm missing something here or I misunderstood your suggestion: I don't know whether you are, it's possible I am confused. What I do know is if I apply the attached patch and run the reproducer, it crashes rapidly, usually on the first run. Pip --000000000000e13aca05bd07d2fa Content-Type: text/x-patch; charset="US-ASCII"; name="dup-dlopen.diff" Content-Disposition: attachment; filename="dup-dlopen.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_km0pyebc0 ZGlmZiAtLWdpdCBhL3NyYy9keW5saWIuYyBiL3NyYy9keW5saWIuYwppbmRleCAxMzM4ZTkxMDlj OTFhLi5kMjliZGIxZTg2ZDBhIDEwMDY0NAotLS0gYS9zcmMvZHlubGliLmMKKysrIGIvc3JjL2R5 bmxpYi5jCkBAIC0yNzAsNiArMjcwLDcgQEAgZHlubGliX2Nsb3NlIChkeW5saWJfaGFuZGxlX3B0 ciBoKQogZHlubGliX2hhbmRsZV9wdHIKIGR5bmxpYl9vcGVuIChjb25zdCBjaGFyICpwYXRoKQog eworICBkbG9wZW4gKHBhdGgsIFJUTERfTEFaWSk7CiAgIHJldHVybiBkbG9wZW4gKHBhdGgsIFJU TERfTEFaWSk7CiB9CiAK --000000000000e13aca05bd07d2fa--