Sergey Petrunia wrote:
> ChangeSet@stripped, 2008-05-10 06:12:44+04:00, sergefp@stripped +2 -0
> BUG#36639: subselect.test crashes on 64 bit pentium4 when compiled for valgrind
> - Use the compiler's default copy constructor for QUICK_RANGE_SELECT.
> bcopy(this, copy, ...) call caused some odd action on gcc-4.1.2 on x86_64
[..]
> - /* Used only by QUICK_SELECT_DESC */
> - QUICK_RANGE_SELECT(const QUICK_RANGE_SELECT& org) : QUICK_SELECT_I()
> - {
> - bcopy(&org, this, sizeof(*this));
This is a bug. QUICK_RANGE_SELECT is a object with multiple inheritance
and virtual methods (vtables). A bitwise copy here is wrong and will
cause obscure and nasty runtime errors.
Regards,
--
Davi Arnaut, Software Engineer
MySQL Server Runtime Team
Database Group, Sun Microsystems