Community
cancel
Showing results for 
Search instead for 
Did you mean: 
andysem
New Contributor III
35 Views

Windows: problems with STLport + leaks

Hi, sorry for not posting this as a bug report, but bugzilla doesn't work.

I think I've found a few problems in the handle_win_error function in tbb_thread.cpp:

1. The FormatMessage function with FORMAT_MESSAGE_ALLOCATE_BUFFER flag allocates memory with LocalAlloc. This memory is never freed. LocalFree should be called.
2. The std::runtime_error exception has an explicit constructor from std::string (19.1.6), but a LPTSTR (which is char*) is passed. This prevents the code from compiling with STLPort. I believe, an explicit construction of std::string from msg_buf is required. Don't forget to include too.

My config:
Windows XP SP1
tbb20_20080408src (modified Makefiles to add include and library paths for STLPort; otherwise untouched)
MSVC 7.1 (Visual Studio 2003 .NET)
STLPort 5.1.4

0 Kudos
1 Reply
35 Views

Thank you for the reportwith sodetailed description. I hope next OSS release will contains fixes for the mentioned issues.
Reply