[Log4cplus-devel] [ log4cplus-Bugs-3563699 ] Assertion fails when boost thread terminates on Linux
Logging Framework for C++
Brought to you by:
wilx
From: SourceForge.net <no...@so...> - 2012-08-31 12:39:42
|
Bugs item #3563699, was opened at 2012-08-31 04:55 Message generated for change (Settings changed) made by wilx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3563699&group_id=40830 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v1.1.x Status: Open Resolution: Accepted >Priority: 6 Private: No Submitted By: gorpknalp (gorpknalp) Assigned to: Václav Zeman (wilx) Summary: Assertion fails when boost thread terminates on Linux Initial Comment: When a boost thread uses a logger, and then terminates (under normal conditions), an assertion fails. This problem does not happen on Windows 7, only on my Raspberry Pi. Using: - log4cplus 1.1.0-rc8 - CMake build type debug with CMAKE_CXX_FLAGS="-std=c++0x" - OS: Raspbian (derived from Debian ARM) Client application using: - shared library - without wchar_t - Boost 1.49 Error message: cachip: /home/pi/prog/log4cplus-1.1.0-rc8/src/global-init.cxx:296: void log4cplus::ptd_cleanup_func(void*): Assertion `arg == reinterpret_cast<void *>(1) || arg == internal::get_ptd ()' failed. Stack trace: #0 0x402d9bfc in raise () from /lib/arm-linux-gnueabihf/libc.so.6 #1 0x402dd97c in abort () from /lib/arm-linux-gnueabihf/libc.so.6 #2 0x00022a08 in ?? () #3 0x00022a08 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-08-31 05:33 Message: This looks similar to the bug reported here: https://sourceforge.net/tracker/?func=detail&aid=3467112&group_id=40830&atid=429075 I will apply the following change (later today, also attached). Please test if it fixes your crash. === modified file 'src/global-init.cxx' --- src/global-init.cxx 2012-08-29 18:59:41 +0000 +++ src/global-init.cxx 2012-08-31 12:16:36 +0000 @@ -293,7 +293,7 @@ // Either it is a dummy value or it should be the per thread data // pointer we get from internal::get_ptd(). assert (arg == reinterpret_cast<void *>(1) - || arg == internal::get_ptd ()); + || arg == internal::get_ptd (false)); (void)arg; threadCleanup (); ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-08-31 05:06 Message: Never mind, I have missed that you have attached files to this report. ---------------------------------------------------------------------- Comment By: Václav Zeman (wilx) Date: 2012-08-31 05:05 Message: Thank you for the bug report. Is it easily reproducible? I have had something similar reported before this one but I were not able to reproduce it myself. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=429073&aid=3563699&group_id=40830 |