oizma / angleproject

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

CPPpragma mishandles/leaks allTokens #62

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 memory leak warnings for misuse of realloc in CPPpragma

What do you see instead?
warning in CPPpragma for allTokens = ... realloc(...allTokens...)

For lack of a better reference on the subject:
http://bytes.com/topic/c/answers/215084-can-realloc-potentially-cause-memory-lea
k#post835458

What version of the product are you using?
r367

On what operating system?
Linux with Coverity 4.5

Please provide any additional information below.
I'm not absolutely certain about the EOF case where the current code just does 
'return token', however the only sign I see of ownership of allTokens being 
transferred is HandlePragma which happens outside the while loop which the 
early return for EOF skips.

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

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alokp@chromium.org on 9 Nov 2010 at 9:50

GoogleCodeExporter commented 9 years ago
The old preprocessor has been replaced with a completely rewritten one.  This 
issue should no longer be a problem. 

Original comment by dan...@transgaming.com on 26 Oct 2012 at 7:27