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: Sun, 7 Mar 2021 21:47:24 +0000 Message-ID: References: <865z3866my.fsf@gmail.com> <865z38a9vo.fsf@gmail.com> <86eehujcip.fsf@gmail.com> <86blch14qt.fsf@gmail.com> <83h7m84h9g.fsf@gnu.org> <86v9ao5czu.fsf@gmail.com> <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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23981"; 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 Sun Mar 07 22:49:14 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 1lJ1Gz-00066t-Bd for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 22:49:13 +0100 Original-Received: from localhost ([::1]:47032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJ1Gy-0008H1-3w for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Mar 2021 16:49:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJ1Go-0008Gu-JL for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 16:49:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJ1Go-0004z8-C9 for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 16:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lJ1Go-0001br-Av for bug-gnu-emacs@gnu.org; Sun, 07 Mar 2021 16:49: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: Sun, 07 Mar 2021 21:49: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.16151536886123 (code B ref 46256); Sun, 07 Mar 2021 21:49:02 +0000 Original-Received: (at 46256) by debbugs.gnu.org; 7 Mar 2021 21:48:08 +0000 Original-Received: from localhost ([127.0.0.1]:41680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJ1Fw-0001ah-Ly for submit@debbugs.gnu.org; Sun, 07 Mar 2021 16:48:08 -0500 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:35966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJ1Fu-0001aD-Kk for 46256@debbugs.gnu.org; Sun, 07 Mar 2021 16:48:07 -0500 Original-Received: by mail-oi1-f170.google.com with SMTP id j1so9016097oiw.3 for <46256@debbugs.gnu.org>; Sun, 07 Mar 2021 13:48:06 -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=Wvcji0Zq4BHcvOe+sK0Xx0w5QlIGrFeNIJD8gUznZy0=; b=OFH2IOE+wKSEXkWKhXYgr7MRyT4vmch+xHX9cDqMCERkTNctNRHpBF0Kk8NHWh/F5w 1yQAfuyNBI/HcIN+Wbu8xRS1HZLN7aX6k3fNArwI8tVERU/doBx5/1BOK53BFChffRpB 6SetoGGk8hMLKUU589IFAkaGY4c5VvsuoSh5C6tiJjrZO0dpGB6sZEr6hKgKvi65cp5O 5SwCdvBDlNU0JwC/zmmCIZCEcFFCLFoj/LNStDiAL7ZjZUAxF7aZEFl4ue/TrnrjhlNj gm5ybm6MNb7BU/b4XE39JeS7iILCkoVi2DjCeIAmzCyVGutnKmNvrsHalin0XPPS9WvR P19A== 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=Wvcji0Zq4BHcvOe+sK0Xx0w5QlIGrFeNIJD8gUznZy0=; b=teaXl6D9zPn/c1vah+QvD/d5UAOQVqHZfi5l11vGvg3hAUxqazUmUZu5yo50/n3tfp cxz75LwHfEzU4hbvp7fbYq5zjkoPjL5i0KJcbbDr6N81N8T0fyygqosRMuc47OyAahu3 l8S7/VvgPeDqO4cAEd0G7alBfeANS5Oz7U+ByDk6x0qJ9SokDcNYFi3FvYjuwa4vWOCm tJNNDFImwNKiFA5LCIDECzNPj7Df2xckkrLWsSnOMPllq3Z8l5zGg9BPfEno4wCNjtSL NIlzVdEUtadXPhrEY3CpKPa9CjDkcCUlWYsb1olbLY1gKn247dO0aqdQMmNUmBJgsc10 I6ow== X-Gm-Message-State: AOAM533Q+OvuH/bSgvLgg5geJwNl8EWNIae5M/Fo290PAmHk8jWuRky9 StBPAHu9MAZS5SuaqcSprWkIAVcmL37CRxI3fxU= X-Google-Smtp-Source: ABdhPJzsB16oia/tzLQffuiyt2k1C/6CJ8IffaOh2jh42VnmMl4RDGzHdVGgUpeCeTgnUjCfkNfo0CsYvaeTDL9Iyo0= X-Received: by 2002:a54:4196:: with SMTP id 22mr4628716oiy.30.1615153680998; Sun, 07 Mar 2021 13:48:00 -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:201789 Archived-At: On Sun, Mar 7, 2021 at 9:27 PM Pip Cet wrote: > What I'm thinking is the CU got GC'ed, which is perfectly okay, but we > never set its COMP_UNIT_SYM pointer to Qnil. Then we dlopen() the same > file again, get the old handle, read the stale COMP_UNIT_SYM pointer, > and dereference it. > > We should verify that the CU is indeed a different PVEC type now > (ideally, PVEC_FREE), and then do something like the attached patch, > shouldn't we? I can reproduce this issue by replacing the single call of dlopen() in dynlib_open with two calls, and I have it open in a debugger if any further information is required. I'll prepare a proper patch next, but until then, can someone help me out and explain why dynlib_close() returns 0 for success on Windows, but 1 for success on POSIX systems? Pip