[llvm] f5314d1 - [Support] On Unix, let the CrashRecoveryContext return the signal code
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 05:33:09 PDT 2020
Thanks Florian! Sorry I'm not a Mac expert, is it because the API isn't there, or because of a missing include?
-----Message d'origine-----
De : Florian Hahn <florian_hahn at apple.com>
Envoyé : September 24, 2020 8:30 AM
À : Alexandre Ganea <alexandre.ganea at ubisoft.com>; Alexandre Ganea <llvmlistbot at llvm.org>
Cc : llvm-commits at lists.llvm.org
Objet : Re: [llvm] f5314d1 - [Support] On Unix, let the CrashRecoveryContext return the signal code
Hi,
> On Sep 24, 2020, at 13:22, Alexandre Ganea via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Alexandre Ganea
> Date: 2020-09-24T08:21:43-04:00
> New Revision: f5314d15af4f4514103ea12c74cb208538b8bef5
>
> URL: https://github.com/llvm/llvm-project/commit/f5314d15af4f4514103ea12c74cb208538b8bef5
> DIFF: https://github.com/llvm/llvm-project/commit/f5314d15af4f4514103ea12c74cb208538b8bef5.diff
>
> LOG: [Support] On Unix, let the CrashRecoveryContext return the signal code
>
> Before this patch, the CrashRecoveryContext was returning -2 upon a signal, like ExecuteAndWait does. This didn't match the behavior on Windows, where the the exception code was returned.
>
> We now return the signal's code, which optionally allows for re-throwing the signal later. Doing so requires all custom handlers to be removed first, through llvm::sys::unregisterHandlers() which we made a public API.
>
> This is part of https://reviews.llvm.org/D70378
This appears to cause build failures on recent macOS:
llvm-project/llvm/unittests/Support/CrashRecoveryTest.cpp:156:5: error: use of undeclared identifier 'raise'
raise(CRC.RetCode - 128);
^
Cheers,
Florian
More information about the llvm-commits
mailing list