oizma / angleproject

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

new[] mismatch with delete instead of delete[] in TVariable::shareConstPointer #59

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 # Mismatched array new/delete warnings in class TVariable

What do you see instead?
TVariable::getConstPointer
unionArray = new ConstantUnion[type.getObjectSize()];
TVariable::shareConstPointer
delete unionArray;

Code flow is in TParseContext::executeInitializer() which calls 
getConstPointer() and shareConstPointer() in turn

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:30

Attachments:

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Fixed in r449.

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