Opened 9 years ago

Closed 9 years ago

#2936 closed Bugs (fixed)

ASIO crashes when reads data from Windows Pipe

Reported by: KHaiFeng@… Owned by: chris_kohlhoff
Milestone: Boost 1.39.0 Component: asio
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:


I found another problem in boost asio library.

I created a pipe server and keep it reading from a windows pipe(read 128 bytes for each operation). Then I created a pipe client to write 257 bytes data to the pipe and the programs crashes at the "operation::do_completion" routine. I have attached the program with full source code, so you can reproduce it (written in VC2008).

A possible solution to this problem is located at It can fix the problem, but the method needs to change boost asio source code, so it's not very convenient.

Attachments (1)

More_read_error.7z (184.7 KB) - added by KHaiFeng@… 9 years ago.
source code to reproduce the bug

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by KHaiFeng@…

Attachment: More_read_error.7z added

source code to reproduce the bug

comment:1 Changed 9 years ago by chris_kohlhoff

Resolution: fixed
Status: newclosed

Fixed in changeset [52419]:

Specifically handle the case when an overlapped ReadFile?? call fails with ERROR_MORE_DATA. This enables a hack where a windows::stream_handle can be used with a message-oriented named pipe.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain chris_kohlhoff.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.