From: Carlos O'Donell <carlos@redhat.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: Removing longjmp error handling from the dynamic loader
Date: Mon, 11 Mar 2019 15:30:38 -0400 [thread overview]
Message-ID: <16606277-89a7-f288-ac69-257d01a2f1c5@redhat.com> (raw)
In-Reply-To: <87va0ptfvr.fsf@oldenburg2.str.redhat.com>
On 3/11/19 2:39 PM, Florian Weimer wrote:
>> So to be clear, you're proposing:
>>
>> "Method 3: Explicit this"
>>
>> Which you argue has highest value, with lowest cost.
>
> Yes, and it also has the best tool support, I think.
>
> We could use the knowledge gained by the conversion to fix bugs, but I
> think it will bit-rot over time, as people add more
> architecture-specific code and support more features in the dynamic
> linker.
>
>> While I've been arguing for "Method 2: C exceptions" which you believe
>> has too much cost given the value, since we'd have to:
>> - move the unwinder to libc
>> - switch to some C++ subset
>
> This sounds tempting as well, but I'm not sure if it's the right place
> to start with using C++ in glibc.
I can accept that :-)
> One thing we have not considered much so far is what you call “free
> lists”, and generally not doing any unrecoverable actions until we reach
> the point of no return in dlopen (and eliminating the possiblity of
> failures in dlclose, by avoiding calling malloc there). For example, we
> could store the temporary file descriptors in the exception context (by
> a callout to libc.so.6) and make sure that they are closed when
> unwinding. We can avoid memory leaks for temporary allocations in much
> the same way.
>
> In a sense, we would provide a more approachable programming environment
> for unwinding.
OK, so lets expand on that a bit, if you went down this route what do the
steps look like? If you enumerate them a bit more I think we'll all be able
to comment on them first, and then agree that it's the right way forward.
--
Cheers,
Carlos.
next prev parent reply other threads:[~2019-03-11 19:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 16:37 Removing longjmp error handling from the dynamic loader Florian Weimer
2019-03-06 15:40 ` Rich Felker
2019-03-07 14:03 ` Adhemerval Zanella
2019-03-11 13:45 ` Florian Weimer
2019-03-11 22:52 ` Rich Felker
2019-03-12 10:30 ` Florian Weimer
2019-03-12 12:00 ` Szabolcs Nagy
2019-03-11 14:07 ` Carlos O'Donell
2019-03-11 15:29 ` Florian Weimer
2019-03-11 16:13 ` Carlos O'Donell
2019-03-11 16:53 ` Zack Weinberg
2019-03-11 17:08 ` Florian Weimer
2019-03-11 18:39 ` Zack Weinberg
2019-03-11 18:49 ` Florian Weimer
2019-03-11 18:39 ` Florian Weimer
2019-03-11 19:30 ` Carlos O'Donell [this message]
2019-03-13 15:51 ` Florian Weimer
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16606277-89a7-f288-ac69-257d01a2f1c5@redhat.com \
--to=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).