This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58822] Segfault when calling make_shared
- From: "michi at triodia dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 23 Oct 2013 12:33:23 +0000
- Subject: [Bug c++/58822] Segfault when calling make_shared
- Auto-submitted: auto-generated
- References: <bug-58822-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58822
--- Comment #20 from Michi Henning <michi at triodia dot com> ---
(In reply to Paolo Carlini from comment #19)
> I'm pretty sure it isn't. It's easy to see why: in the testcase are you
> using *all* the facilities provided by std::shared_ptr as standardized? I
> don't think so! Thus just imagine having the class there, and commenting out
> all the member functions you don't use. Likewise for the free functions.
> Also, including <memory> means *a ton* of code which definitely has
> *nothing* to do with std::shared_ptr. Normally, a C++ testcase is less than
> 100 lines without includes. The exceptions are *extremely* rare.
I'm not really sure what else to do here. The code in total only contains
constructors and destructors. Just looking again, I forgot to delete a #include
for <string> in ExceptionImplBase, and I guess I could have deleted the
namespaces as well.
I'm pretty sure that I'm not using anything in shared_ptr that's outside the
standard, and the standard way to get access to shared_ptr is to include
<memory>. If I include something else, I end up in implementation territory,
don't I?
So, what should I do to get the bug report up to scratch? (I've already spent
quite a few hours cutting this down to what it is now from a large project.)