find(1) memory leak in cygheap
Dave Korn
dave.korn.cygwin@googlemail.com
Thu Aug 20 11:40:00 GMT 2009
Haojun Bao wrote:
> 215 path_conv &operator =(path_conv& pc)
> 216 {
> 217 memcpy (this, &pc, sizeof pc);
Ow yuck! I very much hope nobody ever creates derived classes of path_conv
that introduce virtual functions into the base class, or we're going to have a
very tricky to find bug here. (Hmm, now there's an idea. GCC needs an
__attribute__ that you can tag onto a class to say it must be a POD-type and
get a compiler error if anyone ever adds a virtual function or anything else
that would make the layout non-POD.)
cheers,
DaveK
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list