Re: Optimization bug in virtual call
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Thu, 28 Jun 2007 10:47:04 -0400
Olivier Lauffenburger <utanapishtim@xxxxxxxxxxxxxxxxx> wrote:
Compiled with Visual Studio 2005 SP1 in Release project
configuration, this calls C::SetPosit(), but the call ResetExport()
in C::SetPosit() does not jump to A::ResetExport() but to C::Rotate()
!
Since the two functions are exactly the same, down to the last byte of
machine code, the linker folded them together and set both vtable
pointers to point to the same implementation.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- References:
- Optimization bug in virtual call
- From: Olivier Lauffenburger
- Optimization bug in virtual call
- Prev by Date: Optimization bug in virtual call
- Next by Date: Re: write/read files
- Previous by thread: Optimization bug in virtual call
- Next by thread: RE: Optimization bug in virtual call
- Index(es):