View Issue Details

IDProjectCategoryView StatusLast Update
0004819The Dark ModCodingpublic14.07.2018 05:04
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.06 
Target VersionTDM 2.07Fixed in VersionTDM 2.07 
Summary0004819: Fix warnings about uninitialized members in debug build
DescriptionSomewhere in 2.06 I enabled warnings about members of game entities not being initialized after spawning (debug build only). However, I only fixed some of these warnings. They still spam hard in the game console.

It's time to go through these warnings and add some initialization for the members.
TagsNo tags attached.

Activities

stgatilov

stgatilov

30.06.2018 03:59

administrator   ~0010613

Fixed typeinfo generator in svn rev 7526.

Now it's time to fix the warnings.
stgatilov

stgatilov

01.07.2018 03:54

administrator   ~0010627

Fixed one more issue in memory debugging in svn rev 7528.

The warnings fixed in svn rev 7529 and 7530.
stgatilov

stgatilov

01.07.2018 04:03

administrator   ~0010628

Note: 64-bit version of memory debugging is hopeless, because there are many 8-byte variables, which are aligned up 8-byte boundary. So there are tons of 4-byte padding chunks in classes. All of them are reported as uninitialized.

Just use 32-bit build =)
stgatilov

stgatilov

14.07.2018 05:04

administrator   ~0010676

Last edited: 14.07.2018 05:04

View 2 revisions

One more change in svn rev 7564.

I have made the unitialized members check about 50% less effective on 64-bit mode: now it only checks even 4-byte words, odd 4-byte words are skipped because they produce huge number of false positives due to padding before pointers. As a result, all false positives on 64-bit mode are gone: now you should not see any warnings about uninitialized members in 64-bit mode.

This does not affect 32-bit mode: full check is done there.
BTW, I think the same false positives due to padding may still happen, e.g.:
  struct {
    int num;
    double value;
  };
But luckily it does not happen =)

Issue History

Date Modified Username Field Change
04.06.2018 03:57 stgatilov New Issue
04.06.2018 03:57 stgatilov Status new => assigned
04.06.2018 03:57 stgatilov Assigned To => stgatilov
05.06.2018 16:59 stgatilov Summary Fix warnings about unitialized members in debug build => Fix warnings about uninitialized members in debug build
30.06.2018 03:59 stgatilov Note Added: 0010613
01.07.2018 03:54 stgatilov Note Added: 0010627
01.07.2018 04:03 stgatilov Note Added: 0010628
01.07.2018 04:03 stgatilov Status assigned => resolved
01.07.2018 04:03 stgatilov Fixed in Version => TDM 2.07
01.07.2018 04:03 stgatilov Resolution open => fixed
14.07.2018 05:04 stgatilov Note Added: 0010676
14.07.2018 05:04 stgatilov Note Edited: 0010676 View Revisions