GNU bug report logs -
#70342
29.3.50; treesitter and RTLD_GLOBAL
Previous Next
Reported by: Michael Lausch <mick.lausch <at> gmail.com>
Date: Thu, 11 Apr 2024 18:01:03 UTC
Severity: normal
Tags: moreinfo, notabug
Found in version 29.3.50
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 70342 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Fri, 28 Feb 2025 18:49:50 -0800
> Cc: Michael Lausch <mick.lausch <at> gmail.com>, 70342 <at> debbugs.gnu.org,
> Yuan Fu <casouri <at> gmail.com>
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: Michael Lausch <mick.lausch <at> gmail.com>
> >> Date: Thu, 11 Apr 2024 20:47:50 +0200
> >> Cc: 70342 <at> debbugs.gnu.org
> >>
> >> > A solution can be:
> >> > 1) use a special call to dlopen without the RTLD_OPEN flag, sim,ilar to what the eln loader does.
> >> > 2) fix all the grammars and make all functions 'static' so that the functions are not visible outside the
> >> > compilation unit.
> >> > 3) something i didn't think about
> >>
> >> If those 'serialize' functions are not needed to be called from
> >> outside of the shared library, the usual way is not to export them,
> >> i.e. to give all symbols except the few that need to be exported the
> >> so-called "hidden visibility".
> >>
> >> I agree that this would be the cleanest way to solve the problem, but that would mean to patch all the existing
> >> grammars and maybe all the future grammars and push the changes to their maintainers.
> >>
> >> I started to prep patches for the yaml and org grammar (those were the ones which triggered the bug for me)
> >> and i'm going to have them merged upstream.
> >
> > I understand, but why is this an Emacs problem? We use RTLD_GLOBAL
> > for a reason, and the problem of not exposing unnecessary symbols
> > should be solved by the respective libraries and those who build them.
>
> I'd tend to agree. Should this therefore be closed?
I think so, yes.
> I'm copying in Yuan also.
This bug report was last modified 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.