
Hi Steven
return static_cast
(vtable)->invoker (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); }
a) Is the error on the static_cast or on reading the function pointer?
You could look at the disassembly...
Good call!
Neat feature, this Visual stuff has got here. I see lots of things along those lines. I try to boil it down to a more interesting part:
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
typename BOOST_FUNCTION_FUNCTION<
R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>::result_type
BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
::operator()(BOOST_FUNCTION_PARMS) const
{
1004E4B0 push ebp
1004E4B1 mov ebp,esp
1004E4B3 push 0FFFFFFFFh
1004E4B5 push offset __ehhandler$??R?$function1@XV?$shared_ptr@VTCPConnection@net@pion@@@boost@@@boost@@QBEXV?$shared_ptr@VTCPConnection@net@pion@@@1@@Z (1005A600h)
1004E4BA mov eax,dword ptr fs:[00000000h]
1004E4C0 push eax
1004E4C1 sub esp,40h
1004E4C4 push edi
1004E4C5 push ecx
1004E4C6 lea edi,[ebp-4Ch]
1004E4C9 mov ecx,10h
1004E4CE mov eax,0CCCCCCCCh
1004E4D3 rep stos dword ptr es:[edi]
1004E4D5 pop ecx
1004E4D6 mov eax,dword ptr [___security_cookie (1007C920h)]
1004E4DB xor eax,ebp
1004E4DD push eax
1004E4DE lea eax,[ebp-0Ch]
1004E4E1 mov dword ptr fs:[00000000h],eax
1004E4E7 mov dword ptr [ebp-10h],ecx
1004E4EA mov dword ptr [ebp-4],0
if (this->empty())
1004E4F1 mov ecx,dword ptr [ebp-10h]
1004E4F4 call boost::function_base::empty (100033B4h)
1004E4F9 movzx eax,al
1004E4FC test eax,eax
1004E4FE je boost::function1
However, in the light of the following, it seem more likely that the "this" pointer is invalid.
Indeed. There's even a if (this->empty()) boost::throw_exception(bad_function_call()); to be seen. What I see is either this exception or it is a crash trying to access this. In any case, it's platform specific. But I still don't know how to proceed. Wouldn't here be a bug report in order? Cazart, Stephan