Opened 11 years ago

Closed 11 years ago

#5515 closed Bugs (fixed)

Asio handle_read this=0x0 in http server3 example

Reported by: matthijs@… Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

Hello,

When compiling example http/server3 then I get a segmentation fault. GDB gives the following trace:

#0  0x000000000040e2a2 in http::server3::request_parser::parse<char*> (
   this=0x2078, req=..., begin=0x48 <Address 0x48 out of bounds>, 
   end=0x273 <Address 0x273 out of bounds>) at request_parser.hpp:42
#1  0x000000000040743e in http::server3::connection::handle_read (this=0x0, 
   e=..., bytes_transferred=555) at connection.cpp:48

As you see the 'this=0x0' in #1 is not correct I think. I think this has to do with the internals in Asio but I'm not sure.

I'm using g++ 4.6 in combination with boost trunk. I'm not able to reproduce this with boost 1.46.1.

When using g++ 4.5 and boost-trunk it works. (I already sent a message to the boost-users mailinglist but didn't got any response on that)

Regards,

Matthijs Möhlmann

Change History (3)

comment:1 by matthijs@…, 11 years ago

I use the following options to compile:

-std=c++0x -g -Wall -Werror -I/usr/src/boost-trunk

Hopefully that helps in reproducing the error.

Regards,

Matthijs Möhlmann

comment:2 by chris_kohlhoff, 11 years ago

(In [71738]) Fix move-related bug in strand implementation. Refs #5515.

comment:3 by chris_kohlhoff, 11 years ago

Resolution: fixed
Status: newclosed

Fix merged to release branch in [72428].

Note: See TracTickets for help on using tickets.