Compile the following program using 4.6 or trunk compiler and run it,
the program will seg fault. The problem is that the D3_Spec's primary
vtable has a null entry for virtual function id which it overrides.

The root cause is that the base class's virtual function list for the
derived class is copied from the base class -- so that lost_primary
bit may be 'inherited'. However this bit is not properly reset to 0
after the derive class's vtable is analyzed.

The attached trivial patch fixed the problem.

Bootstrap and tested x86_64/linux.

Ok for trunk and 46 branch?

Thanks,

David

Attachment: p
Description: Binary data

Reply via email to