The definition for wxSocketBase::Destroy is missing %ungc (or %ungc_this ?). This comes up as a crash during the GC loop after sock:Destroy() is called.