oizma / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

angle: TPoolAllocator::totalBytes is never initialized #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run Coverity on mozilla-central from something after 
http://hg.mozilla.org/mozilla-central/rev/582be9aca672

What is the expected output?
no UNINIT_CTOR warnings for TPoolAllocator

What do you see instead?
totalBytes is listed.

None of this changes totalBytes:

80 TPoolAllocator::TPoolAllocator(bool g, int growthIncrement, int
allocationAlignment) : 
81     global(g),

87 {
92     if (pageSize < 4*1024)
93         pageSize = 4*1024;

99     currentPageOffset = pageSize;

105     size_t minAlign = sizeof(void*);
106     alignment &= ~(minAlign - 1);
107     if (alignment < minAlign)
108         alignment = minAlign;
109     size_t a = 1;
110     while (a < alignment)
111         a <<= 1;
112     alignment = a;
113     alignmentMask = a - 1;

118     headerSkip = minAlign;
119     if (headerSkip < sizeof(tHeader)) {
120         headerSkip = (sizeof(tHeader) + alignmentMask) & ~alignmentMask;

http://mxr.mozilla.org/mozilla-central/search?string=totalBytes&find=angle

/gfx/angle/src/compiler/PoolAlloc.cpp
    * line 250 -- totalBytes += numBytes;

/gfx/angle/src/compiler/PoolAlloc.h
    * line 211 -- size_t totalBytes; // just an interesting statistic

What version of the product are you using?
r367

On what operating system?
Linux with Coverity 4.5

Please provide any additional information below.

Original issue reported on code.google.com by timel...@gmail.com on 12 Oct 2010 at 4:35

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 13 Oct 2010 at 9:27

GoogleCodeExporter commented 9 years ago
Fixed in r452.

Original comment by alokp@chromium.org on 14 Oct 2010 at 4:17