all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: hx <silent2600@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: changed dlopen flags in dynlib.c, gccemacs crash
Date: Wed, 8 Dec 2021 14:01:29 +0800	[thread overview]
Message-ID: <CAALPCHvYBuNkj-Bj1tiOp6ReeK420QwttEotK0gCNHKFum3DxQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

Hi,

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]
/usr/src/emacs/src/emacs(+0x1c44ad)[0x558a8d05f4ad]
/usr/src/emacs/src/emacs(+0x1c4513)[0x558a8d05f513]
/usr/src/emacs/src/emacs(+0x1c46ab)[0x558a8d05f6ab]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x7f3bba1a4140]
/usr/src/emacs/src/emacs(+0x2b60b6)[0x558a8d1510b6]
/home/silent/.emacs.d/eln-cache/28.0.90-8dcada16/cconv-3b1f1f98-cca24f72.eln(top_level_run+0x87)[0x7f3bb37045a7]
/usr/src/emacs/src/emacs(+0x2b5d18)[0x558a8d150d18]
/usr/src/emacs/src/emacs(+0x2b6830)[0x558a8d151830]

[-- Attachment #2: Type: text/html, Size: 1530 bytes --]

             reply	other threads:[~2021-12-08  6:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08  6:01 hx [this message]
2021-12-08 13:15 ` changed dlopen flags in dynlib.c, gccemacs crash Eli Zaretskii
2021-12-09  0:51   ` hx
2021-12-09  8:37     ` Eli Zaretskii
2021-12-09 10:53       ` Andrea Corallo
2021-12-09 12:08         ` Eli Zaretskii
2021-12-09 20:47           ` Andrea Corallo
2021-12-11  2:29       ` hx
2021-12-11  8:23         ` Eli Zaretskii
2021-12-11 18:09           ` Andrea Corallo
2021-12-11 18:23             ` Eli Zaretskii
2021-12-11 20:53               ` Andrea Corallo
2021-12-15 15:26                 ` Andrea Corallo
2021-12-15 16:59                   ` Eli Zaretskii
2022-03-06 14:32             ` Philipp Stephani
2022-03-06 15:32               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAALPCHvYBuNkj-Bj1tiOp6ReeK420QwttEotK0gCNHKFum3DxQ@mail.gmail.com \
    --to=silent2600@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.