satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

miniz.c:2567:59: runtime error: load of misaligned address 0x00010bd3187b for type 'const mz_uint32' (aka 'const unsigned int'), which requires 4 byte alignment #128

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

Running with sanitizers https://github.com/satoshinm/NetCraft/pull/124 (cmake -DDEBUG .., native build) reports unaligned addresses in the miniz code added in https://github.com/satoshinm/NetCraft/pull/125:

/Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:3014:9: warning: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files. [-W#pragma-messages]
#pragma message("Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support large files.")
        ^
1 warning generated.
[ 65%] Linking C executable craft
[100%] Built target craft
/Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2567:59: runtime error: load of misaligned address 0x00010bd3187b for type 'const mz_uint32' (aka 'const unsigned int'), which requires 4 byte alignment
0x00010bd3187b: note: pointer points here
 f7  8b 70 33 01 13 30 01 13  30 01 13 30 01 13 30 01  13 30 01 13 30 01 13 30  01 13 30 01 13 30 01
              ^ 
SUMMARY: AddressSanitizer: undefined-behavior /Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2567:59 in 
/Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2675:58: runtime error: load of misaligned address 0x00010bdd3802 for type 'const mz_uint32' (aka 'const unsigned int'), which requires 4 byte alignment
0x00010bdd3802: note: pointer points here
 80 7f  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
              ^ 
SUMMARY: AddressSanitizer: undefined-behavior /Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2675:58 in 
/Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2676:58: runtime error: load of misaligned address 0x00010bdd3806 for type 'const mz_uint32' (aka 'const unsigned int'), which requires 4 byte alignment
0x00010bdd3806: 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
             ^ 
SUMMARY: AddressSanitizer: undefined-behavior /Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2676:58 in 
/Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2675:25: runtime error: store to misaligned address 0x00010bdd3a06 for type 'mz_uint32' (aka 'unsigned int'), which requires 4 byte alignment
0x00010bdd3a06: note: pointer points here
 00 00 00 00 be be  be be be be be be be be  be be be be be be be be  be be be be be be be be  be be
             ^ 
SUMMARY: AddressSanitizer: undefined-behavior /Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2675:25 in 
/Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2676:25: runtime error: store to misaligned address 0x00010bdd3a0a for type 'mz_uint32' (aka 'unsigned int'), which requires 4 byte alignment
0x00010bdd3a0a: note: pointer points here
 00 00  00 00 be be be be be be  be be be be be be be be  be be be be be be be be  be be be be be be
              ^ 
SUMMARY: AddressSanitizer: undefined-behavior /Users/admin/games/wasm/NetCraft/deps/miniz/miniz.c:2676:25 in