https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
OK you got me interested, so I've downloaded and build the app.
With gcc-5 and -fsanitize=undefined I get many alignment errors:

 Pre-heating ...
../src/kernel_lion_encode.c:182:54: runtime error: store to misaligned address
0x7fa7274ed3d4 for type 'uint64_t', which requires 8 byte alignment
0x7fa7274ed3d4: 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
              ^ 
../src/kernel_lion_encode.c:169:52: runtime error: load of misaligned address
0x7fa7273d5da8 for type '__int128 unsigned', which requires 16 byte alignment
0x7fa7273d5da8: 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
              ^ 
../src/kernel_lion_encode.c:182:54: runtime error: store to misaligned address
0x7fa72758b204 for type 'uint64_t', which requires 8 byte alignment
0x7fa72758b204: 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
              ^ 
../src/kernel_lion_encode.c:169:52: runtime error: load of misaligned address
0x7fa727415a98 for type '__int128 unsigned', which requires 16 byte alignment
0x7fa727415a98: 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
              ^ 
../src/kernel_lion_encode.c:182:56: runtime error: load of misaligned address
0x7fa727504e9c for type 'uint64_t', which requires 8 byte alignment
0x7fa727504e9c: 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
              ^ 
../src/kernel_lion_encode.c:182:56: runtime error: load of misaligned address
0x7fa72754de44 for type 'uint64_t', which requires 8 byte alignment
0x7fa72754de44: 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
              ^ 
../src/kernel_lion_encode.c:182:56: runtime error: load of misaligned address
0x7fa72751446c for type 'uint64_t', which requires 8 byte alignment
0x7fa72751446c: note: pointer points here
  00 00 00 00 32 20 33 20  33 20 34 0a 32 20 33 20  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_encode.c:169:52: runtime error: load of misaligned address
0x7fa7273b128c for type '__int128 unsigned', which requires 16 byte alignment
0x7fa7273b128c: 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  66
66 65 72 00 00 00 00
              ^ 
../src/kernel_lion_encode.c:182:54: runtime error: store to misaligned address
0x7fa727571c5c for type 'uint64_t', which requires 8 byte alignment
0x7fa727571c5c: note: pointer points here
  23 20 32 33 23 20 31 39  65 78 74 65 00 00 00 00  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/buffer.c:38:55: runtime error: load of misaligned address 0x0000020fd8cc
for type 'uint_fast64_t', which requires 8 byte alignment
0x0000020fd8cc: note: pointer points here
  00 00 00 00 b5 98 00 00  00 00 00 00 43 3c 00 00  00 00 00 00 03 00 00 00  03
00 00 00 03 00 00 00
              ^ 
../src/buffer.c:38:80: runtime error: load of misaligned address 0x0000020fd8d4
for type 'uint_fast64_t', which requires 8 byte alignment
0x0000020fd8d4: note: pointer points here
  00 00 00 00 43 3c 00 00  00 00 00 00 03 00 00 00  03 00 00 00 03 00 00 00  00
00 00 00 b5 98 00 00
              ^ 
../src/kernel_lion_decode.c:84:50: runtime error: store to misaligned address
0x00000223dd54 for type 'uint64_t', which requires 8 byte alignment
0x00000223dd54: 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
              ^ 
../src/kernel_lion_decode.c:90:28: runtime error: load of misaligned address
0x000002126728 for type '__int128 unsigned', which requires 16 byte alignment
0x000002126728: 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
              ^ 
../src/kernel_lion_decode.c:84:50: runtime error: store to misaligned address
0x000002259b94 for type 'uint64_t', which requires 8 byte alignment
0x000002259b94: 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
              ^ 
../src/kernel_lion_decode.c:84:52: runtime error: load of misaligned address
0x00000225581c for type 'uint64_t', which requires 8 byte alignment
0x00000225581c: 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
              ^ 
../src/kernel_lion_decode.c:84:52: runtime error: load of misaligned address
0x000002275754 for type 'uint64_t', which requires 8 byte alignment
0x000002275754: 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
              ^ 
../src/kernel_lion_decode.c:84:50: runtime error: store to misaligned address
0x0000022dbb84 for type 'uint64_t', which requires 8 byte alignment
0x0000022dbb84: note: pointer points here
  22 3c 62 75 22 77 74 66  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_decode.c:84:52: runtime error: load of misaligned address
0x0000022f5d34 for type 'uint64_t', which requires 8 byte alignment
0x0000022f5d34: note: pointer points here
  00 00 00 00 20 33 36 35  20 31 20 22 20 32 32 20  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_decode.c:84:52: runtime error: load of misaligned address
0x0000022c5704 for type 'uint64_t', which requires 8 byte alignment
0x0000022c5704: note: pointer points here
  00 00 00 00 2c 20 5f 5f  5f 5f 20 28 2c 20 2e 2e  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_decode.c:84:50: runtime error: store to misaligned address
0x000002299be4 for type 'uint64_t', which requires 8 byte alignment
0x000002299be4: note: pointer points here
  6c 6f 6e 67 73 68 6f 72  63 68 61 72 00 00 00 00  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_decode.c:90:28: runtime error: load of misaligned address
0x00000222ec4c for type '__int128 unsigned', which requires 16 byte alignment
0x00000222ec4c: note: pointer points here
  00 00 00 00 3e 3e 20 38  5f 5f 61 74 00 00 00 00  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_decode.c:84:52: runtime error: load of misaligned address
0x0000022fa774 for type 'uint64_t', which requires 8 byte alignment
0x0000022fa774: note: pointer points here
  00 00 00 00 63 74 20 74  63 74 0a 20 63 74 20 74  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/kernel_lion_decode.c:84:50: runtime error: store to misaligned address
0x0000022e36e4 for type 'uint64_t', which requires 8 byte alignment
0x0000022e36e4: note: pointer points here
  72 65 74 75 20 20 75 6e  72 65 74 75 00 00 00 00  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 
../src/buffer.c:38:55: runtime error: load of misaligned address 0x0000020fd95c
for type 'uint_fast64_t', which requires 8 byte alignment
0x0000020fd95c: note: pointer points here
  01 00 00 00 43 3c 00 00  00 00 00 00 b5 98 00 00  00 00 00 00 00 0c 03 03  00
00 00 00 00 00 00 00
              ^ 
../src/buffer.c:38:80: runtime error: load of misaligned address 0x0000020fd964
for type 'uint_fast64_t', which requires 8 byte alignment
0x0000020fd964: note: pointer points here
  00 00 00 00 b5 98 00 00  00 00 00 00 00 0c 03 03  00 00 00 00 00 00 00 00  00
00 00 00 00 00 00 00
              ^ 

This is undefined behavior. So closing this bug as invalid.

Reply via email to