intel / intel/hyperscan

hs_alloc_scratch failed: -6

Open
#107 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

I was getting a -6 error from hs_alloc_scratch. It looks like that happens when the CPU features at compile time don't match those of the currently running host. We are using fat binaries and building on a host that doesn't support AVX512 and AVX2. The host we're running on does support those CPU features. When we got that -6 error we were passing NULL for the platform argument to hs_compile. I changed the code to use hs_populate_platform to populate the platform struct and then cleared the CPU features to match what was used at compile time. Then I passed that to hs_compile. We don't get the error anymore but is that the correct way to fix that error? Is it possible to compile on a host that doesn't support AVX512 and AVX2 but have those enabled on a host that does support them?

Thanks,
Aaron

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.