Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boost thread and UPX compression == not valid win32 application?

When I just declare

boost::thread t1, t2;

in my program and then compress .exe file with UPX, the compression succeeds. But when I try to launch the compressed exe, Windows tells me that it's "not valid win32 application".

There is a bug report for UPX (similar bug), but it has different error message ("The application failed to initialize properly (0xc0000005)").

In my case OS thinks the file is corrupted or something, so it cant even be started to show errors! Why??

Win7x64, C++, VisualStudio, boost 1.47, UPX3.07

strange news:

  1. Unpacking exe makes corrupted exe that throws error exactly the same as here. ("The application failed to initialize properly (0xc0000005)") And this is for unpacked exe, not packed as in bug report.

  2. extern "C" void tss_cleanup_implemented(void) {} before the inclusion of boost's thread header does not matter. The result is the same.

main.cpp:

#include <boost/thread.hpp>

int main(int argc, char** argv)
{
    boost::thread t;
    return 0;
}

May be someone will try to compile and compress?

like image 651
Sergey Avatar asked Nov 24 '11 19:11

Sergey


1 Answers

Bug was repaired in new version 3.08. It's ok now.

like image 101
Sergey Avatar answered Oct 21 '22 12:10

Sergey