diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-07 18:21:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-07 18:21:19 +0200 |
commit | 9c9f0ea2c38929d133b0fe2faf616ecab17e07c9 (patch) | |
tree | 692821f2b387b637367ff2a2394eb1d84d6f0d04 /bridges/inc | |
parent | 525063f24d2a95bd0ae47780f7e7cb15333f0d33 (diff) |
Include RTTI in generated vtables for ubsan's vptr-based checks
...though only on gcc3_linux_x86-64 for now.
Change-Id: Id90554425e78b38a5a97149f2a7d3ac04cbe0c9b
Diffstat (limited to 'bridges/inc')
-rw-r--r-- | bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx index 613358dc84e0..5b4b06b4e03c 100644 --- a/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx +++ b/bridges/inc/bridges/cpp_uno/shared/vtablefactory.hxx @@ -128,9 +128,11 @@ private: void freeBlock(Block const & block) const; - void createVtables( + sal_Int32 createVtables( GuardedBlocks & blocks, BaseOffset const & baseOffset, - typelib_InterfaceTypeDescription * type, bool includePrimary) const; + typelib_InterfaceTypeDescription * type, sal_Int32 vtableNumber, + typelib_InterfaceTypeDescription * mostDerived, bool includePrimary) + const; // This function is not defined in the generic part, but instead has to be // defined individually for each CPP--UNO bridge: @@ -150,9 +152,15 @@ private: @param block the start address of the raw vtable block @param slotCount the number of slots + @param vtableNumber zero-based count across all the most derived type's + vtables (for vtable's "offset to top" slot) + @param type non-null most derived type (for vtable's "typeinfo pointer" + slot) @return a pointer past the last vtable slot */ - static Slot * initializeBlock(void * block, sal_Int32 slotCount); + static Slot * initializeBlock( + void * block, sal_Int32 slotCount, sal_Int32 vtableNumber, + typelib_InterfaceTypeDescription * type); // This function is not defined in the generic part, but instead has to be // defined individually for each CPP--UNO bridge: |