On 09/10/15 10:17, Ramana Radhakrishnan wrote:
This started as a Friday afternoon project ...

It turned out enabling VTV for AArch64 and ARM was a matter of fixing PR67868 
which essentially comes from building libvtv with section anchors turned on. 
The problem was that the flow of control from output_object_block through to 
switch_section did not have the same special casing for the vtable section that 
exists in assemble_variable.

Once this was done, I managed to build and test aarch64-none-linux-gnu with 
--enable-vtable-verify, a similar test was done for armhf.

Testing showed no regressions in the gcc/ g++ testsuites for aarch64 and armhf
Testing showed no failures in libvtv testsuite for aarch64 but a few more 
failures - see below.
Testing showed 2 failures in libstdc++-v3 testsuite compared to without vtable 
verification.

FAIL: libstdc++-abi/abi_check
FAIL: experimental/filesystem/iterators/directory_iterator.cc execution test

However both these failures also occur on x86_64 - so I'm content to declare 
victory on AArch64
as far as basic enablement goes.

On ARM I see the following failures that I still need to debug - I can see that 
the failure is because the write to _ZN4_VTVI1BE12__vtable_mapE does not elicit 
a SEGV but I need to go further than that.

FAIL: libvtv.cc/thunk_vtable_map_attack.cc -O0 -fvtable-verify=std execution 
test
FAIL: libvtv.cc/thunk_vtable_map_attack.cc -O2 -fvtable-verify=std execution 
test
FAIL: libvtv.cc/thunk_vtable_map_attack.cc -O0 -fvtable-verify=preinit 
execution test
FAIL: libvtv.cc/thunk_vtable_map_attack.cc -O2 -fvtable-verify=preinit 
execution test


Questions -

1. Are the generic changes to varasm.c ok ?
2. Can we take the AArch64 support in now, given this amount of testing ? 
Marcus / Caroline ?

+  aarch64*-*-linux*)
+       VTV_SUPPORTED=yes
        ;;

Ramana, Go ahead an add the aarch64 enable once you have the pre-requisite varasm changes approved.

Cheers
/Marcus

3. Any suggestions / helpful debug hints for VTV debugging (other than turning 
VTV_DEBUG on and inspecting trace) ?

There's an arm*-*-* hunk there but I'm easy about applying that right now and 
figuring out the issues
over time. In case we don't fix it for 6.0 we can rip the support out before 
release.


Thanks,
Ramana

P.S. (Yes, I'll provide a Changelog :) )


Reply via email to