|
Boost Users : |
Subject: Re: [Boost-users] [asio]crash when acess boost::system::error_code err.message()
From: victor (victor.boost.program_at_[hidden])
Date: 2010-01-13 05:46:15
sorry. It's bug of my own code.
Because use custom memory for aync_write, and allocate/dallocate memory in
two thread.
when un-dallocate in another thread, reused in the first thread .
2010/1/13 victor <victor.boost.program_at_[hidden]>
> hello,
> I use boost1.40.0 on linux2.6/gcc4.1.2.
>
> when my process execute code as flow, my process crash.:
> void CSapConnection::HandleWrite(const boost::system::error_code& err)
> {
> std::cout<<"error:" <<err.message()<<"\n";
> }
> This coredump information:
>
> Program terminated with signal 11, Segmentation fault.
> #0 0x080c7c83 in boost::system::error_code::message (this=0xb6bf0f64) at
> /usr/local/boost_1_40_0/boost/system/error_code.hpp:347
> 347 std::string message() const { return
> m_cat->message(value()); }
> (gdb) p this
> $1 = (const boost::system::error_code * const) 0xb6bf0f64
> (gdb) p *this
> $2 = {m_val = 136236300, m_cat = 0xd56658}
> (gdb) p *m_cat
> $3 = {<boost::noncopyable_::noncopyable> = {<No data fields>},
> _vptr.error_category = 0x0}
>
> Is this a bug of asio??
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net