Open ShakyaPr opened 3 months ago
Like always, AddressSanitizer is your friend
Context is nullptr, why? I don't know
We are running three server instances in three different threads. Occasionally, when creating an ssl_server object using SSLApp, the httpContext is null. Is there any reason for this? Is this socket creation isn't thread safe?
Like always, AddressSanitizer is your friend
Use these tools. If you wonder about threading, use ThreadSanitizer. I don't accept bug reports of crashes without these tools being used.
Description:
I am experiencing a segmentation fault when attempting to retrieve the SSL context of my SSL server using the following code:
SSL_CTX* sslContext = static_cast<SSL_CTX *>(_ssl_server->getNativeHandle());
Observations:
Stack Trace : I used gdb to obtain the stack trace, which points to an issue in openssl.c:
Library Build : The uWebSocket library was built without the
LIBUS_NO_SSL
flag.Comparative Test : To isolate the issue, I created an identical HTTPS server in a separate project. In this test project, I was able to retrieve the
SSL_CTX
without any issues. Both projects use the same libraries and versions, but only my current development project encounters the segmentation fault.Details:
Current Development Environment:
LIBUS_NO_SSL
.Test Project Environment:
SSL_CTX
.