Bug 1792 - parameter logger constructor
parameter logger constructor
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
pre-release
PC Mac OS
: P5 normal
Assigned To: Peter Barnes
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 17:53 UTC by Tom Henderson
Modified: 2014-02-17 00:51 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2013-11-07 17:53:06 UTC
Reported by John Abraham

Current ns-3.18.1 release candidate crashes on at least one Mac due to something related to this issue:

http://lists.cs.uiuc.edu/pipermail/llvmbugs/2013-February/027328.html

Suggested fix is:

- ParameterLogger::ParameterLogger (std::ostream &os)
-  : m_itemNumber (0),
    m_os (os)
- {
- }



+ ParameterLogger::ParameterLogger (std::ostream &os)
+  : std::basic_ostream<char> (os.rdbuf ()),m_itemNumber (0),
+    m_os (os)
+{
+}


John noted that this was required for the windows port as well
Comment 1 Peter Barnes 2013-11-07 18:16:20 UTC
I haven't had problems here (but I don't use LLVM).  The suggested patch compiles for me.

I'd suggest a line break, and a pointer to this bug report:

diff -r e09c25931173 src/core/model/log.cc
--- a/src/core/model/log.cc     Thu Oct 24 09:04:46 2013 -0700
+++ b/src/core/model/log.cc     Thu Nov 07 15:13:06 2013 -0800
@@ -580,7 +580,8 @@
 
 
 ParameterLogger::ParameterLogger (std::ostream &os)
-  : m_itemNumber (0),
+  : std::basic_ostream<char> (os.rdbuf ()),  //!< \bugid{1792}
+    m_itemNumber (0),
     m_os (os)
 {
 }
Comment 2 Tom Henderson 2013-11-19 14:43:23 UTC
pushed in changeset 10399:d70bd78aae8d
Comment 3 Alex Afanasyev 2014-02-17 00:51:48 UTC
*** Bug 1853 has been marked as a duplicate of this bug. ***