OpenTTD

Tasklist

FS#3288 - valgrind warns about using uninitialized value when saving TTO-loaded game

Attached to Project: OpenTTD
Opened by Zdeněk Sojka (SmatZ) - Friday, 30 October 2009, 22:11 GMT
Last edited by Remko Bijker (Rubidium) - Friday, 30 October 2009, 23:24 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

r17904

Happens only to games loaded from TTO savegames.

==14595== Conditional jump or move depends on uninitialised value(s)
==14595== at 0x73A26F: SlSaveLoadConv(void*, unsigned int) (saveload.cpp:540)
==14595== by 0x73B2FD: SlObjectMember(void*, SaveLoad const*) (saveload.cpp:903)
==14595== by 0x73B538: SlObject(void*, SaveLoad const*) (saveload.cpp:968)
==14595== by 0x72C19A: Save_ENGN() (engine_sl.cpp:58)
==14595== by 0x7389BE: SlSaveChunk(ChunkHandler const*) (saveload.cpp:1080)
==14595== by 0x738A3A: SlSaveChunks() (saveload.cpp:1103)
==14595== by 0x73A8D4: SaveOrLoad(char const*, int, Subdirectory, bool) (saveload.cpp:1851)
==14595== by 0x6DC574: SwitchToMode(SwitchMode) (openttd.cpp:1055)
==14595== by 0x6DC6AF: GameLoop() (openttd.cpp:1242)
==14595== by 0x7DA533: VideoDriver_SDL::MainLoop() (sdl_v.cpp:564)
==14595== by 0x6DD596: ttd_main(int, char**) (openttd.cpp:740)
==14595== by 0x6ECAFD: main (unix.cpp:256)
==14595== Uninitialised value was created by a stack allocation
==14595== at 0x72D579: std::map<unsigned short, Engine, std::less<unsigned short>, std::allocator<std::pair<unsigned short const, Engine> > >::operator[](unsigned short const&) (stl_map.h:411)
==14595==
(application/octet-stream)    Trt61.sv1 (229.9 KiB)
This task depends upon

Closed by  Remko Bijker (Rubidium)
Friday, 30 October 2009, 23:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  In r17908

Loading...