d5/node.native — Issue #7: SIGSEGV on MinGW
Author: chenlailin
Created: 2012-02-20 07:53:04+00:00
State: open

I tried to use the webcient and webserver and the client correctly got the message:
HTTP/1.1 200 OK
Content-Length: 8
Content-Type: text/plain

C++ FTW

But the server immediately SIGSEGVs on native::http::client_context::~client_context()

here is the full stack trace:
(gdb) bt
#0 0x004306be in native::http::client_context::~client_context()::{lambda()#1}::operator()() const () at ./native/http.h:335
#1 0x0042d79d in std::_Function_handler::_M_invoke(std::_Any_data const&) (__functor=...)
at c:/mingw/bin/../lib/gcc/mingw32/4.6.2/include/c++/functional:1778
#2 0x0042b9fc in std::function::operator()() const (this=0x7b2d68) at c:/mingw/bin/../lib/gcc/mingw32/4.6.2/include/c++/functional:2161
#3 0x0042a7a8 in native::internal::callback_object >::invoke<>() (this=0x7b2d60) at ./native/callback.h:46
#4 0x0042b243 in native::callbacks::invoke>(void*, int) (target=0x7b59a8, cid=0) at ./native/callback.h:84
#5 0x0042ff4c in native::base::handle::close(std::function)::{lambda(uv_handle_s*)#1}::operator()(uv_handle_s*) const (this=0x0, h=0x7b5918) at ./native/handle.h:55
#6 0x0042ff81 in native::base::handle::close(std::function)::{lambda(uv_handle_s*)#1}::_FUN(uv_handle_s*) (h=0x7b5918) at ./native/handle.h:57
#7 0x00404d5c in uv_tcp_endgame (loop=0x446040, handle=0x7b5918) at src/win/tcp.c:213
#8 0x0040412b in uv_process_endgames (loop=0x446040) at src/win/handle.c:184
#9 0x00403114 in uv_run (loop=0x446040) at src/win/core.c:262
#10 0x0040145b in native::run () at ./native/loop.h:94
#11 0x0040287b in _fu0___ZSt4cout () at webserver.cpp:14