Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: --enable-sp=yes,asm causes crashes when AVX support is missing #7976

Closed
vifino opened this issue Sep 14, 2024 · 1 comment · Fixed by #7979
Closed

[Bug]: --enable-sp=yes,asm causes crashes when AVX support is missing #7976

vifino opened this issue Sep 14, 2024 · 1 comment · Fixed by #7979
Assignees
Labels

Comments

@vifino
Copy link

vifino commented Sep 14, 2024

Contact Details

Here, on GitHub, preferrably.

Version

5.7.2

Description

Running HAProxy with wolfSSL configured with enable-sp=yes,asm causes HAProxy to coredump on startup if AVX/AVX2 is not supported.

The function tripping the coredump is sp_256_get_point_33_avx2_4.

Please make sure this is guarded by runtime detection of AVX/AVX2, like AES-NI.

Reproduction steps

  1. --enable-haproxy --enable-quic --enable-reproducible-build --enable-bigcache --enable-sp=yes,asm --enable-sp-math-all --enable-harden --enable-intelasm --enable-aesni
  2. Run on CPU without AVX support (for example in VM)
  3. Watch it coredump. :(

Relevant log output

No response

@SparkiDev
Copy link
Contributor

Hi @vifino,

The code switches on the availability of BMI2 and ADX which in hardware is only available with AVX2.
But, since you have this issue, I have made a code change in a this PR: #7979.

Let me know if this works for you.

Sean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants