[Bug sanitizer/70147] testcase from hana testsuite gets miscompiled with -fsanitize=undefined
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 14 10:35:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you Jakub for the reduced test-case.
As I've read the source code, current_vtt_parm is
properly defined in start_preparsed_function function.
vtt_parm definition:
/* In a base member initializer, we cannot rely on the
vtable being set up. We have to indirect via the vtt_parm. */
So as suggested by Jakub, we have to somehow replace
((struct C *) this)->D.2663.D.2604._vptr.A with read of current_vtt_parm
which can be quite easily passed to cp_ubsan_dfs_initialize_vtbl_ptrs.
Question is how to easily replace these? Should I process a dfs_walk a replace
all occurrences, or is there any easier approach?
Thanks,
Martin
More information about the Gcc-bugs
mailing list