https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255698

--- Comment #3 from [email protected] ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=630caa95d46191220dd457c2ae2d06460cb4f71b

commit 630caa95d46191220dd457c2ae2d06460cb4f71b
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-05-10 19:02:19 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-05-10 23:47:00 +0000

    rtld: preserve the 'seen' state of the dlerror message in errmsg_save()

    rtld preserves its current error message around calls to user init/fini
    lists, to not override original error with potential secondary errors
    caused by user code recursing into rtld.  After 4d9128da54f8f8e2a29190,
    the preservation of the string itself is not enough, the 'seen'
    indicator must be preserved as well.  Otherwise, since new code does not
    clear string (it cannot), call to _rtld_error() from errmsg_restore()
    revived whatever message was consumed last.

    Change errmsg_save() to return structure recording both 'seen' indicator
    and the message, if any.

    PR:     255698
    Reported by:    Eugene M. Kim <[email protected]>
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days

 libexec/rtld-elf/rtld.c | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to