Skip to content

Commit 0005c56

Browse files
committed
internal.h (get_ptd): Remove alloc = false to fix SIGSEGV
in new threads when log4cplus is compiled with _WIN32_WINNT>=0x0600.
1 parent dcedb2e commit 0005c56

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

include/log4cplus/internal/internal.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,9 @@ set_ptd (per_thread_data * p)
150150
}
151151

152152

153-
//! The default value of the \param alloc is false for Win32 DLL builds
154-
//! since per thread data are already initialized by DllMain().
155153
inline
156154
per_thread_data *
157-
get_ptd (bool alloc
158-
#if defined (_WIN32) && defined (LOG4CPLUS_BUILD_DLL)
159-
= false
160-
#else
161-
= true
162-
#endif
163-
)
155+
get_ptd (bool alloc = true)
164156
{
165157
if (LOG4CPLUS_UNLIKELY (! ptd && alloc))
166158
return alloc_ptd ();

0 commit comments

Comments
 (0)