#16610 closed defect (fixed)
COMMON: Leak of memory allocated in gzio.cpp
| Reported by: | tunnelsociety | Owned by: | lephilousophe |
|---|---|---|---|
| Priority: | normal | Component: | Common |
| Version: | Keywords: | ||
| Cc: | Game: |
Description
Run ScummVM configured with --disable-zlib and load a save game (probably any engine; I tested PhoenixVR and Nancy) which is compressed.
Attaching ASan reports for sample Nancy and PhoenixVR cases.
Head of every leaked alloc bt is:
#0 in calloc (scummvm+0xee2cdd) (BuildId: 9363591178c51873f07dcaf031d3ee64dc39193c) #1 in Common::huft_build(unsigned int*, unsigned int, unsigned int, unsigned short const*, unsigned short const*, Common::huft**, int*) common/compression/gzio.cpp:481:28 #2 in Common::GzioReadStream::init_dynamic_block() common/compression/gzio.cpp:927:7 #3 in Common::GzioReadStream::inflate_window() common/compression/gzio.cpp:1044:4 #4 in Common::GzioReadStream::readAtOffset(long, unsigned char*, unsigned int) common/compression/gzio.cpp:1261:4 #5 in Common::GzioReadStream::read(void*, unsigned int) common/compression/gzio.cpp:1289:21
For now I will reconfigure with --enable-zlib and carry on! Ah, incidentally, loading nancy3 is significantly faster now, even though I was building --disable-zlib with -O3.
Attachments (2)
Change History (4)
by , 3 months ago
| Attachment: | asan-lochness.txt added |
|---|
by , 3 months ago
| Attachment: | asan-nancy3.txt added |
|---|
comment:1 by , 8 weeks ago
| Owner: | set to |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
comment:2 by , 8 weeks ago
| Owner: | changed from to |
|---|
Yes, GZio is really slow and should not be used when possible.
Please proceed with zlib.
But thanks for testing this code path though.
Note:
See TracTickets
for help on using tickets.

In b94b31d6: