https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115050
Sam James <sjames at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sjames at gcc dot gnu.org --- Comment #2 from Sam James <sjames at gcc dot gnu.org> --- Clang trunk UBSAN says: ``` /app/example.cpp:22:5: runtime error: constructor call on misaligned address 0x7ffe75477cbb for type 'Handler<Testor> *', which requires 8 byte alignment 0x7ffe75477cbb: note: pointer points here 00 62 52 4a fe c8 7b 00 00 01 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:22:5 /app/example.cpp:22:5: runtime error: constructor call on misaligned address 0x7ffe75477cbb for type 'VTable', which requires 8 byte alignment 0x7ffe75477cbb: note: pointer points here 00 62 52 4a fe c8 7b 00 00 01 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:22:5 /app/example.cpp:8:7: runtime error: constructor call on misaligned address 0x7ffe75477cbb for type 'VTable *', which requires 8 byte alignment 0x7ffe75477cbb: note: pointer points here 00 62 52 4a fe c8 7b 00 00 01 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:8:7 /app/example.cpp:24:27: runtime error: constructor call on misaligned address 0x7ffe75477cc3 for type 'Testor', which requires 8 byte alignment 0x7ffe75477cc3: note: pointer points here 68 5a 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 00 90 9d 42 fe c8 7b 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:24:27 /app/example.cpp:11:13: runtime error: member call on misaligned address 0x7ffe75477cbb for type 'VTable *', which requires 8 byte alignment 0x7ffe75477cbb: note: pointer points here 00 62 52 4a 60 4c 47 5d 68 5a 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:11:13 /app/example.cpp:39:62: runtime error: member call on misaligned address 0x7ffe75477cbb for type 'VTable', which requires 8 byte alignment 0x7ffe75477cbb: note: pointer points here 00 62 52 4a 60 4c 47 5d 68 5a 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:39:62 /app/example.cpp:29:5: runtime error: member call on misaligned address 0x7ffe75477cbb for type 'Handler<Testor> *', which requires 8 byte alignment 0x7ffe75477cbb: note: pointer points here 00 62 52 4a 60 4c 47 5d 68 5a 00 00 00 00 00 00 00 67 6c 69 62 00 00 00 00 01 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /app/example.cpp:29:5 caught! std::bad_exception ``` GCC's reports nothing though.