summaryrefslogtreecommitdiff
path: root/crc_simd.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-02-17 14:15:02 -0500
committerJeffrey Walton <noloader@gmail.com>2020-02-17 14:15:02 -0500
commit6fa3e38e5c26820396d11a5a155fc83790d17c72 (patch)
treed1aef601107380e718b1efffa34eb90cea34b130 /crc_simd.cpp
parenta76c29a11e9029132f537f6853a9daa846f54f03 (diff)
downloadcryptopp-git-6fa3e38e5c26820396d11a5a155fc83790d17c72.tar.gz
Restore SIGILL handler if sigprocmask fails
We've never encountered this case, but better safe then sorry.
Diffstat (limited to 'crc_simd.cpp')
-rw-r--r--crc_simd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/crc_simd.cpp b/crc_simd.cpp
index 35509335..93ab9bc9 100644
--- a/crc_simd.cpp
+++ b/crc_simd.cpp
@@ -87,7 +87,10 @@ bool CPU_ProbeCRC32()
volatile sigset_t oldMask;
if (sigprocmask(0, NULLPTR, (sigset_t*)&oldMask))
+ {
+ signal(SIGILL, oldHandler);
return false;
+ }
if (setjmp(s_jmpSIGILL))
result = false;