[lld] r285224 - Call _exit.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 12:19:38 PST 2016
On Thu, Nov 10, 2016 at 11:06 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> On 10 November 2016 at 14:03, Rui Ueyama <ruiu at google.com> wrote:
> > On Thu, Nov 10, 2016 at 6:47 AM, Rafael EspĂndola
> > <rafael.espindola at gmail.com> wrote:
> >>
> >> On 10 November 2016 at 00:28, Rui Ueyama <ruiu at google.com> wrote:
> >> > I think we could add a new member function to SpecificBumpPtrAllocator
> >> > to
> >> > discard all objects without calling their dtors. Now that almost all
> >> > objects
> >> > are allocated from the pool, so if we call that function before
> exiting,
> >> > exit should be as fast as _exit.
> >>
> >> But is then the static destructors run the risk of accessing freed
> memory,
> >> no?
> >
> >
> > How does it happen?
>
> It seems too easy to have a global that points to a pool allocated entry.
>
They shouldn't use objects allocated from the pool from the dtor in the
first place because even now the pool may be freed earlier than the other
globals, no?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161110/88e679f6/attachment.html>
More information about the llvm-commits
mailing list