From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: changed dlopen flags in dynlib.c, gccemacs crash Date: Thu, 09 Dec 2021 10:53:57 +0000 Message-ID: References: <83tufjw848.fsf@gnu.org> <83lf0uuqaq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17545"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: hx , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 09 11:55:17 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mvH53-0004OP-AV for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 11:55:17 +0100 Original-Received: from localhost ([::1]:52118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvH52-00027r-5d for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Dec 2021 05:55:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvH3y-0000Vd-MD for emacs-devel@gnu.org; Thu, 09 Dec 2021 05:54:11 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:59167) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvH3q-0007P5-HD; Thu, 09 Dec 2021 05:54:09 -0500 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 1B9ArvE2019907 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 9 Dec 2021 10:53:58 GMT In-Reply-To: <83lf0uuqaq.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Dec 2021 10:37:49 +0200") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281480 Archived-At: Eli Zaretskii writes: >> From: hx >> Date: Thu, 9 Dec 2021 08:51:03 +0800 >> Cc: emacs-devel >> >> remove the directory (28.0.90-xxx) from ~/.emacs.d/eln-cache/, >> start emacs with -nw -q, it will crash after a few seconds without any operation. >> after that, it will crash immediately when I start it with the same parameters. > > It doesn't crash when I try reproducing it, so something is missing > from the recipe. Is this with an unmodified Emacs 28.0.90, or is it > with your change in dynlib.c? > > Anyway, does the patch below help? > > Andrea, any better ideas? I don't understand the reason for the > crash, as we seem to have defenses against this in Fnative_elisp_load, > so I'm probably missing something. Hello all, I'm no expert on 'dlopen' so I'm not sure about the impact of using RTLD_GLOBAL. But should be noted that .eln files do share a number of symbol names, I'm wondering if this could be somehow problematic when using RTLD_GLOBAL, that's my suspect here. Andrea