chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.89k stars 1.21k forks source link

Possible loss of socket descriptor in reactor_op_cancellation on 64-bit platforms #1309

Open antrv opened 1 year ago

antrv commented 1 year ago

The descriptor_ field of reactor_op_cancellation has int type and it is used to store a socket descriptor, but on 64-bit Windows the SOCKET type is an alias of ULONG_PTR and has size of 64 bits.

This causes:

antrv commented 1 year ago

https://github.com/chriskohlhoff/asio/pull/1308