[PATCH] D23662: [libclang] Control whether crash recovery is enabled/disabled using function argument.

will via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 23:46:35 PDT 2016


wrmsr added a comment.

I just lost a few days diagnosing what wound up being this :(

In https://reviews.llvm.org/D23662#519445, @john.brawn wrote:

> Surely the fix then is to make sure CrashRecoveryContext::Disable //does// reinstall the right signal handler?


The fix is to not do this by default as this breaks host environments. Libraries that don’t explicitly relate to signal handling have no business overriding signal handlers.

> Why not? Also I notice that using environment variables to control behaviour is used in a bunch of places in libclang so you're introducing some inconsistency here.


There are already API exports controlling crash recovery so the API is already inconsistent in addition to being broken by default. I understand env vars controlling environment related variability (dev vs prod) but not host-process and callsite related variability (cpython vs java).


Repository:
  rL LLVM

https://reviews.llvm.org/D23662





More information about the cfe-commits mailing list