Skip to content

Many misaligned address errors when built with -fsanitize=address,undefined #356

@andy5995

Description

@andy5995

Built by using CFLAGS=-fsanitize=address,undefined CXXFLAGS=-fsanitize=address,undefined ./build-mg.sh

This is the terminal output just from starting the game and clicking New Game->Lan Game

$ ./megaglest
megaglest v3.13-dev
Compiled using: GNUC: 140201 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5993.2e1b4c4d1] - using STREFLOP [SSE] - [no-denormals]
/home/andy/src/megaglest-source/source/glest_game/global/core_data.cpp:1167:12: runtime error: downcast of address 0x50c000069ac0 which does not point to an object of type 'Font2D'
0x50c000069ac0: note: object is of type 'Shared::Graphics::Gl::Font3DGl'
 00 00 00 00  38 ba 72 04 d1 60 00 00  d8 9a 06 00 c0 50 00 00  00 00 00 00 00 00 00 00  00 69 6d 65
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'Shared::Graphics::Gl::Font3DGl'
/home/andy/src/megaglest-source/source/glest_game/network/network_message.cpp:485:40: runtime error: constructor call on misaligned address 0x51e0000504b1 for type 'struct NetworkMessage', which requires 8 byte alignment
0x51e0000504b1: note: pointer points here
 be be be  be 00 00 00 00 00 00 00  00 be be be be be be be  be be be be be be be be  be be be be be
              ^ 
/home/andy/src/megaglest-source/source/glest_game/network/network_message.h:99:7: runtime error: member access within misaligned address 0x51e0000504b1 for type 'struct NetworkMessage', which requires 8 byte alignment
0x51e0000504b1: note: pointer points here
 be be be  be 00 00 00 00 00 00 00  00 be be be be be be be  be be be be be be be be  be be be be be
              ^ 
/home/andy/src/megaglest-source/source/glest_game/network/network_message.h:414:12: runtime error: constructor call on misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:531:7: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:314:7: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:141:19: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_impl', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:99:4: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_impl_data', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:99:16: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_impl_data', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:99:29: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_impl_data', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/home/andy/src/megaglest-source/source/glest_game/network/network_message.h:414:12: runtime error: member call on misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:736:28: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:736:28: runtime error: member call on misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:301:22: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:735:15: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:735:15: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:738:7: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct vector', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:738:7: runtime error: member call on misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:368:15: runtime error: member call on misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:369:17: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:369:45: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:368:15: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:370:7: runtime error: member access within misaligned address 0x78b0dbf6891f for type 'struct _Vector_base', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 
/usr/include/c++/14.2.1/bits/stl_vector.h:370:7: runtime error: member call on misaligned address 0x78b0dbf6891f for type 'struct _Vector_impl', which requires 8 byte alignment
0x78b0dbf6891f: note: pointer points here
 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00
             ^ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions