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

[openssl] OpenSSL initialization segfaults at runtime with arm64-windows triplet in release build #42828

Open
equeim opened this issue Dec 21, 2024 · 0 comments

Comments

@equeim
Copy link
Contributor

equeim commented Dec 21, 2024

Describe the bug
Following simple program:

#include <iostream>
#include <openssl/ssl.h>

int main(int argc, char** argv) {
    std::cout << "Entered main\n";
    auto* ctx = SSL_CTX_new(TLS_client_method());
    std::cout << "Created SSL_CTX " << ctx << "\n";
    std::cout << "Exiting main\n";
    return 0;
}

Crashes at runtime with "Access violation - code c0000005" error in ssl_cipher_collect_ciphers function, with arm64-windows triplet and release build of the program. When compiling in debug mode the crash does not occur.

Environment

  • OS: Windows 11
  • Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34435 for ARM64

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install openssl:arm64-windows
  2. Compile program above in release mode and run it

Expected behavior
Program does not crash.

Failure logs
Error message in WinDgb:

(6f4.788): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
arm64_crash!ssl_cipher_collect_ciphers+0x34:
00007ff7`0111728c a903dff6 stp         x22,x23,[sp,#0x38]

Additional context
I'm testing in in a Windows 11 VM on MacBook Air M1.

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

No branches or pull requests

1 participant