[llvm] r262667 - [libFuzzer] when interrupted, call _Exit() instead of exit()
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 3 15:14:31 PST 2016
Ah, thanks for the detail - can't say I was familiar with that.
On Thu, Mar 3, 2016 at 3:01 PM, Aaron Ballman <aaron at aaronballman.com>
wrote:
> On Thu, Mar 3, 2016 at 5:59 PM, David Blaikie via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Portability for one, I'd imagine - does _Exit exist in all the platforms
> we
> > want to run on?
>
> It should, it's part of the C standard library incorporated by
> reference into C++ (aka, C99).
>
> ~Aaron
>
> >
> > On Thu, Mar 3, 2016 at 2:56 PM, Kostya Serebryany <kcc at google.com>
> wrote:
> >>
> >> Why?
> >> I call this when interrupted by Ctrl-C, so I don't want any
> >> std::at_quick_exit handlers to be called.
> >> Otherwise it's just _Exit
> >>
> >> On Thu, Mar 3, 2016 at 2:46 PM, David Blaikie <dblaikie at gmail.com>
> wrote:
> >>>
> >>> quick_exit, perhaps?
> >>> http://en.cppreference.com/w/cpp/utility/program/quick_exit
> >>>
> >>> On Thu, Mar 3, 2016 at 2:36 PM, Kostya Serebryany via llvm-commits
> >>> <llvm-commits at lists.llvm.org> wrote:
> >>>>
> >>>> Author: kcc
> >>>> Date: Thu Mar 3 16:36:37 2016
> >>>> New Revision: 262667
> >>>>
> >>>> URL: http://llvm.org/viewvc/llvm-project?rev=262667&view=rev
> >>>> Log:
> >>>> [libFuzzer] when interrupted, call _Exit() instead of exit()
> >>>>
> >>>> Modified:
> >>>> llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
> >>>>
> >>>> Modified: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp
> >>>> URL:
> >>>>
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp?rev=262667&r1=262666&r2=262667&view=diff
> >>>>
> >>>>
> ==============================================================================
> >>>> --- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp (original)
> >>>> +++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp Thu Mar 3 16:36:37 2016
> >>>> @@ -130,7 +130,7 @@ void Fuzzer::CrashCallback() {
> >>>> void Fuzzer::InterruptCallback() {
> >>>> Printf("==%d== libFuzzer: run interrupted; exiting\n", GetPid());
> >>>> PrintFinalStats();
> >>>> - exit(0);
> >>>> + _Exit(0); // Stop right now, don't perform any at-exit actions.
> >>>> }
> >>>>
> >>>> void Fuzzer::AlarmCallback() {
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> llvm-commits mailing list
> >>>> llvm-commits at lists.llvm.org
> >>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >>>
> >>>
> >>
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160303/a89bb5f5/attachment.html>
More information about the llvm-commits
mailing list