Skip to content

src: pass along errors from `--security-reverts`

Rodrigo Muino Tomonari requested to merge github/fork/addaleax/revert-error into master

Pass along errors from Revert() when a security revert is unknown (which currently applies to all possible values).

Previously, we would unconditionally call exit(), which is not nice for embedding use cases, and could crash because we were holding a lock for a mutex in ProcessGlobalArgs() that would be destroyed by calling exit().

Also, add a regression test that makes sure that the process exits with the right exit code and not a crash.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading