]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Do not compile hyperscan with no SSSE3 support
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 26 Mar 2017 09:54:48 +0000 (10:54 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 26 Mar 2017 09:54:48 +0000 (10:54 +0100)
src/hs_helper.c

index 94e50e7212d4c3ef617777ef66024955b8892157..208ebe4e4f1d10cb709f858fd129e3d562c72b68 100644 (file)
@@ -181,6 +181,12 @@ rspamd_rs_compile (struct hs_helper_ctx *ctx, struct rspamd_worker *worker,
        static struct rspamd_srv_command srv_cmd;
        gint ncompiled;
 
+       if (!(ctx->cfg->libs_ctx->crypto_ctx->cpu_config & CPUID_SSSE3)) {
+               msg_warn ("CPU doesn't have SSSE3 instructions set "
+                               "required for hyperscan, disable hyperscan compilation");
+               return FALSE;
+       }
+
        if (!rspamd_hs_helper_cleanup_dir (ctx, forced)) {
                msg_warn ("cannot cleanup cache dir '%s'", ctx->hs_dir);
        }