Memory leak in persistence.cc while loading game
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Undecided
|
GunChleoc |
Bug Description
LSan reports a memory leak when loading a savegame.
To reproduce:
1. Start Widelands
2. Load a singleplayer savegame. Any win condition should trigger this except for endless game.
3. Leave game
4. Close Widelands
#26 0x559cf5134a4e in unpersist_
#27 0x559cf5034d9c in LuaGameInterfac
#28 0x559cf4df5596 in Widelands:
#29 0x559cf486ecbd in Widelands:
Related branches
- Widelands Developers: Pending requested
-
Diff: 17 lines (+3/-3)1 file modifiedsrc/scripting/persistence.cc (+3/-3)
Changed in widelands: | |
assignee: | nobody → GunChleoc (gunchleoc) |
status: | New → In Progress |
Changed in widelands: | |
milestone: | build20-rc1 → build21-rc1 |
I managed to fix 1 of 2 memory leaks in the attached branch: The remaining leak:
Direct leak of 128 byte(s) in 4 object(s) allocated from: x86_64- linux-gnu/ libasan. so.4+0xdef40) third_party/ eris/lauxlib. c:1015 third_party/ eris/lmem. c:86 third_party/ eris/lfunc. c:48 third_party/ eris/eris. c:1603 third_party/ eris/eris. c:2307 third_party/ eris/eris. c:1892 third_party/ eris/eris. c:2313 third_party/ eris/eris. c:1013 third_party/ eris/eris. c:1154 third_party/ eris/eris. c:1167 third_party/ eris/eris. c:2304 third_party/ eris/eris. c:1013 third_party/ eris/eris. c:1154 third_party/ eris/eris. c:1167 third_party/ eris/eris. c:2304 third_party/ eris/eris. c:1426 third_party/ eris/eris. c:2319 third_party/ eris/eris. c:1617 third_party/ eris/eris. c:2307 third_party/ eris/eris. c:1013 third_party/ eris/eris. c:1154 third_party/ eris/eris. c:1167 third_party/ eris/eris. c:2304 third_party/ eris/eris. c:2558 third_party/ eris/eris. c:2742 object( lua_State* , FileRead&, Widelands: :MapObjectLoade r&, unsigned int) ../src/ scripting/ persistence. cc:281 e::read_ global_ env(FileRead& , Widelands: :MapObjectLoade r&, unsigned int) ../src/ scripting/ logic.cc: 166 :MapScriptingPa cket::read( FileSystem& , Widelands: :EditorGameBase &, bool, Widelands: :MapObjectLoade r&) ../src/ map_io/ map_scripting_ packet. cc:72 :WidelandsMapLo ader::load_ map_complete( Widelands: :EditorGameBase &, Widelands: :MapLoader: :LoadType) ../src/ map_io/ widelands_ map_loader. cc:326
#0 0x7f7c3fdd2f40 in realloc (/usr/lib/
#1 0x5617582dba7b in l_alloc ../src/
#2 0x5617582e8cb2 in luaM_realloc_ ../src/
#3 0x5617582e3171 in luaF_initupvals ../src/
#4 0x5617582d29a1 in u_closure ../src/
#5 0x5617582d46a2 in unpersist ../src/
#6 0x5617582d3518 in u_thread ../src/
#7 0x5617582d46be in unpersist ../src/
#8 0x5617582d0d5d in u_literaltable ../src/
#9 0x5617582d13ae in u_special ../src/
#10 0x5617582d13f7 in u_table ../src/
#11 0x5617582d4694 in unpersist ../src/
#12 0x5617582d0d5d in u_literaltable ../src/
#13 0x5617582d13ae in u_special ../src/
#14 0x5617582d13f7 in u_table ../src/
#15 0x5617582d4694 in unpersist ../src/
#16 0x5617582d22ca in u_upval ../src/
#17 0x5617582d46da in unpersist ../src/
#18 0x5617582d2a72 in u_closure ../src/
#19 0x5617582d46a2 in unpersist ../src/
#20 0x5617582d0d5d in u_literaltable ../src/
#21 0x5617582d13ae in u_special ../src/
#22 0x5617582d13f7 in u_table ../src/
#23 0x5617582d4694 in unpersist ../src/
#24 0x5617582d50e1 in unchecked_unpersist ../src/
#25 0x5617582d59e3 in eris_undump ../src/
#26 0x5617581f92d2 in unpersist_
#27 0x5617580f9524 in LuaGameInterfac
#28 0x561757eb9cfc in Widelands:
#29 0x561757933267 in Widelands: