From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: changed dlopen flags in dynlib.c, gccemacs crash Date: Wed, 08 Dec 2021 15:15:19 +0200 Message-ID: <83tufjw848.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36637"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: hx Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 08 14:22:52 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 1muwuJ-0009IM-Tq for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 14:22:52 +0100 Original-Received: from localhost ([::1]:46960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muwuI-0005sV-EE for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Dec 2021 08:22:50 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muwnS-0007PQ-Bf for emacs-devel@gnu.org; Wed, 08 Dec 2021 08:15:46 -0500 Original-Received: from [2001:470:142:3::e] (port=57186 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muwnQ-0001P9-CB; Wed, 08 Dec 2021 08:15:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fW9bALan0NPuACa1H6E+Adb2mMsWtfprYRgRwLJTtrU=; b=Dc28H9SSrHx+ dbX74uv1GeaMEdZ+100xj6z7eODzRCxxoW9ex9vHHk3JrFeoJJZJk2RVlOXkIn/VWjSGqixtveKHk QgHtGz/QU6qDbfJVrgLWaBERzDVTD1dqp58O3Ur+61ADCE4uVzM0JAv0KM4+8A2ytgG7oBtcqmhdS XDCe+OkGCXQ1HfKTKgcXk6Wkhq+8jDnmVR3P+uRp6aqOfCdymxo7X3g+e8RobqK8GHieFfU+lEcKu 2xIBHPN/ohsVRf5WlNtdNtwZRm1nJU6Ou0e2i+s2Dt+mkXoXUFjstbo/kvvNrjYjagvJMB7ePJ1Uv GwjObiVeRdhD+yq0aDjAJQ==; Original-Received: from [87.69.77.57] (port=1968 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muwnJ-0000j7-D9; Wed, 08 Dec 2021 08:15:42 -0500 In-Reply-To: (message from hx on Wed, 8 Dec 2021 14:01:29 +0800) 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:281346 Archived-At: > From: hx > Date: Wed, 8 Dec 2021 14:01:29 +0800 > > I changed the flags of dlopen in dynlib.c: > > dynlib_handle_ptr > dynlib_open (const char *path) > { > // return dlopen (path, RTLD_LAZY); > > return dlopen (path, RTLD_LAZY|RTLD_GLOBAL); > } > > then my dynamic module can load other .so in emacs-27. > > but it make gccemacs-28 crash: > > $ /usr/src/emacs/src/emacs -nw -q > Fatal error 11: Segmentation fault > Backtrace: > /usr/src/emacs/src/emacs(+0x1c4c13)[0x558a8d05fc13] > /usr/src/emacs/src/emacs(+0x199a0e)[0x558a8d034a0e] > /usr/src/emacs/src/emacs(+0x1c44d8)[0x558a8d05f4d8] Please run this under GDB and show the backtrace from the crash in human-readable form. Also, please describe what you did immediately before the crash. Thanks.