VectorCamp / vectorscan

A portable fork of the high-performance regular expression matching library
https://www.vectorcamp.gr/project/vectorscan/
Other
512 stars 55 forks source link

hs_valid_platform: Fix check for SSE4.2 #310

Closed mtremer closed 3 months ago

mtremer commented 3 months ago

Vectorscan requires SSE4.2 as a minimum on x86_64. For Hyperscan this used to be SSSE3.

Applications that use the library call hs_valid_platform() to check if the CPU fulfils this minimum requirement. However, when Vectorscan upgraded to SSE4.2, the check was not updated. This leads to the library trying to execute instructions that are not supported, resulting in the application to crash.

This might not have been noticed as the CPUs that do not support SSE4.2 are rather old and unlikely to run any load where performance is an issue. However, I believe that the library should not let the application crash.

mtremer commented 3 months ago

Thank you!