Bug in PVRShell.cpp ?

This topic contains 1 reply, has 2 voices, and was last updated by  Tobias Hector 6 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30704

    mf23
    Member

    when I look at
    c:Imagination TechnologiesPOWERVR SDKOGLES2_WINDOWS_PCEMULATION_2.07.27.0484ShellPVRShell.cpp

    I find this constructor:
    PVRShellInit::PVRShellInit()
    {
        memset(this, 0, sizeof(*this));
    }

    Setting the whole class to ZEROs also means setting the VTABLE to ZERO, right?
    And this class is inheriting other classes!

    class PVRShellInit : public PVRShellInitAPI, public PVRShellInitOS

    So the VTABLE is erased? But still it is working? Compiler-specific?
    Or my misunderstanding?

    Thanks,

    #35284

    Hi,

    Whilst a memset operation would overwrite a class’ pointer to its vtable, there is no such issue here. The ShellInit, ShellInitAPI and ShellInitOS classes do not contain any virtual functions, and so have no vtable to overwrite.

    Thanks,

    Tobias

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.