invalid access to stack memory?
Hi all, followed detail of the case, an object constructor store this pointer to a static variable. could it be a problem? detail/call_stack.hpp explicit context(Key* k) : key_(k), next_(call_stackKey, Value::top_) { value_ = reinterpret_castunsigned char*(this); call_stackKey, Value::top_ = this; // == store this to a static variable } detail/impl/strand_service.ipp void strand_service::do_complete(io_service_impl* owner, operation* base, const boost::system::error_code ec, std::size_t /*bytes_transferred*/) { if (owner) { strand_impl* impl = static_caststrand_impl*(base); // Indicate that this strand is executing on the current thread. call_stackstrand_impl::context ctx(impl); // == local variable ctx, its this pointer will be stroed in a static variable. Regards, Alex
participants (1)
-
alexc