<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Crash when destructing object from class deriving from std::ostream (using default constructor)"
   href="http://llvm.org/bugs/show_bug.cgi?id=15337">15337</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when destructing object from class deriving from std::ostream (using default constructor)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>hhinnant@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>duvan.llvm@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Reduced test case:
Testcase:

#include <ostream>

struct Stream : public std::ostream {
    Stream() : std::ostream() {}
};

int main() {
    Stream crash;
    return 0;
}

The code was compiled with clang 3.2 on Macos Snow Leopard. The libc++ used was
svn version r175274.

Valgrind stack trace (although from a little more involved case as valgrind
crashes on the above case).

==11856==    at 0x100066761:
std::__1::ios_base::__call_callbacks(std::__1::ios_base::event) (in
/Users/sduvan/Code/libcxx/lib/libc++.1.dylib)
==11856==    by 0x100066711: std::__1::ios_base::~ios_base() (in
/Users/sduvan/Code/libcxx/lib/libc++.1.dylib)
==11856==    by 0x100017671: std::__1::unique_ptr<Log,
std::__1::default_delete<Log> >::~unique_ptr() (in /Users/sduvan/test)
==11856==    by 0x100198373: __cxa_finalize (in /usr/lib/libSystem.B.dylib)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>