You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SSL casts the socket handle to its own copy of SocketWrapper #158
src/hx/libs/ssl/SSL.cpp and src/hx/libs/std/Socket.cpp each define a different struct SocketWrapper (only Socket.cpp's overrides __GetType), which breaks the one-definition rule, and _hx_ssl_set_socket casts any Dynamic to SSL's copy without a type check. UBSan's vptr check reports it (#148). It works only while the layouts match, and a non-socket argument crashes. Share one definition and check the handle type, as val_sock in Socket.cpp does.
Correction: Socket.cpp's SocketWrapper is in an anonymous namespace, so it is not a one-definition clash. The bug is the unchecked cast in SSL.cpp to an unrelated type.
Activity
dimensionscape commentedon Oct 15, 2026
Correction: Socket.cpp's SocketWrapper is in an anonymous namespace, so it is not a one-definition clash. The bug is the unchecked cast in SSL.cpp to an unrelated type.
Check the socket handle when binding an SSL context to it