From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: dynamic reload of dynamic module not dynamic?
Date: Tue, 19 Apr 2022 13:08:21 +0200 [thread overview]
Message-ID: <874k2pwct6.fsf@zoho.eu> (raw)
In-Reply-To: Yl5FEGUBdw4zhDlO@tuxteam.de
tomas wrote:
> This is not completely trivial. Parts of the application may
> have become dependent on the loaded library. [...]
I don't see how that is any different from eval'ing a Lisp
function, if something else uses it and the new version don't
do what the old did it sure won't happen (or fail, if you
change the interface which you should always change with care
anyway). Or introduce another bug. But how would it else be,
dynamic update of code which only works when the updates
makes sense?
> Just imagine your application storing a pointer to some
> function in that DL. You remove it, the address space
> becomes free and is replaced by something totally different.
> The above code calls into this pointer and... kaboom.
> You literally pulled the rug from under your poor
> application :-)
What we are imagining is rather a change that made sense so
the poor application can have its own rags to riches story ...
> Now you would say you wouldn't ever hoard pointers to random
> library functions, but that's exactly what the dynamic
> loader is doing for you.
You mean like this?
https://dataswamp.org/~incal/emacs-init/random-urandom/random-urandom.c
> Not saying it's impossible, but that it's trickier than it
> seems. Most of the time you'll have to live with several
> incarnations of "some functions" because your "old function"
> refuses to die. Most applications choose to restart.
Tricky but maybe it can be made simple, look
1. a uses b, what happens is b
2. b is edited (let's call it b' just to denote the change)
3. a uses b, what happens is b'
?
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2022-04-19 11:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-17 4:42 dynamic reload of dynamic module not dynamic? Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-17 18:31 ` Eduardo Ochs
2022-04-17 20:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-17 18:44 ` Philipp Stephani
2022-04-17 20:12 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-04-19 5:13 ` tomas
2022-04-19 11:08 ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
2022-04-20 17:06 ` Eli Zaretskii
2022-04-19 12:46 ` Philipp Stephani
2022-04-19 14:01 ` Emanuel Berg via Users list for the GNU Emacs text editor
-- strict thread matches above, loose matches on Subject: below --
2024-07-04 7:00 Psionic K
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=874k2pwct6.fsf@zoho.eu \
--to=help-gnu-emacs@gnu.org \
--cc=moasenwood@zoho.eu \
/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.