This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Double destructor call in vtable thunks.



During virtual function calls via a vtable thunk, the destructor is called
twice on the function's arguments, once by the thunk and once the by
function being thunked.  ( See attached test case for an example. )

I think that the attached patch (against 3.0.3) solves this problem.

make check-g++ succeeds (with the exception of g++.ext/instantiate1.C, but
this fails with the unpatched build too).

--
Richard Smith

Attachment: gcc-3.0.3-vtable-thunk-bug.diff
Description: Patch

Attachment: gcc-vtable-thunk-test.cc
Description: Test case


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]