GunChleoc has proposed merging lp:~widelands-dev/widelands/valgrind into lp:widelands.
Commit message: Update Valgrind suppressions and fix uninitialized variables reported by Valgrind Memcheck - Uninitialized variable in default AI - Uninitialized variables in Building Statistics - Exclude more errors from zip filesystem, Eris and graphics drivers Requested reviews: Widelands Developers (widelands-dev) For more details, see: https://code.launchpad.net/~widelands-dev/widelands/valgrind/+merge/364213 I used Valgrind to have a look at memory errors caused by Widelands code. Found a few uninitialized variables. Our code seems to be pretty clean already thanks to ASan :) -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/valgrind into lp:widelands.
=== modified file 'src/ai/defaultai.cc' --- src/ai/defaultai.cc 2019-02-23 11:00:49 +0000 +++ src/ai/defaultai.cc 2019-03-10 11:42:22 +0000 @@ -113,6 +113,7 @@ ts_in_const_count_(0), ts_without_trainers_(0), enemysites_check_delay_(30), + spots_(0), resource_necessity_water_needed_(false), highest_nonmil_prio_(0), expedition_ship_(kNoShip) { === modified file 'src/wui/building_statistics_menu.cc' --- src/wui/building_statistics_menu.cc 2019-02-23 11:00:49 +0000 +++ src/wui/building_statistics_menu.cc 2019-03-10 11:42:22 +0000 @@ -111,6 +111,11 @@ kButtonHeight, "", UI::Align::kRight), + current_building_type_(INVALID_INDEX), + last_building_index_(0), + last_building_type_(INVALID_INDEX), + lastupdate_(0), + was_minimized_(false), low_production_(33), has_selection_(false), nr_building_types_(parent.egbase().tribes().nrbuildings()) { === modified file 'valgrind.supp' --- valgrind.supp 2019-03-10 09:07:24 +0000 +++ valgrind.supp 2019-03-10 11:42:22 +0000 @@ -48,6 +48,13 @@ ... } { + driver1 + Memcheck:Addr1 + ... + obj:*965_dri.so + ... +} +{ driver2 Memcheck:Addr2 ... @@ -69,6 +76,13 @@ ... } { + driver16 + Memcheck:Addr16 + ... + obj:*i965_dri.so + ... +} +{ SDL2Leak Memcheck:Leak ... @@ -95,3 +109,39 @@ obj:*linux-gnu/lib* ... } +{ + ZipWriteValue8 + Memcheck:Value8 + ... + fun:zipWriteInFileInZip + ... +} +{ + ZipWriteCond + Memcheck:Cond + ... + fun:zipWriteInFileInZip + ... +} +{ + ZipCloseCond + Memcheck:Cond + ... + fun:zipCloseFileInZip + ... +} +{ + ZipCloseParam + Memcheck:Param + write(buf) + ... + fun:zipCloseFileInZip + ... +} +{ + ErisLeak + Memcheck:Leak + ... + fun:l_alloc + ... +}
_______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp