# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #44993]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=44993 >


Hi all,

In looking through some of the warnings that Coverity Prevent has
thrown up one common thing has come up which I'd like some advice
about.  We are getting "leaked storage" errors often associated with
variables declared as SymReg[1].  For example, in
compilers/imcc/pbc.c, at line 1463, the variable 'r' is assigned and
then goes out of scope a few lines afterwards.  This Coverity picks up
as being leaked storage.  However, if I put C<mem_sys_free(r);> at the
end of the relevant block, C<make test> fails.  There are other
instances as well compilers/imcc/imcparser.c:2964 (i.e.
compilers/imcc/imcc.y:598) and compilers/imcc/imcparser.c:675,
compilers/imcc/imcparser.c659 (this time with the variable 'r3').

What is the tool trying to tell us here?
Are resources (potentially) being leaked?
How should this be remedied?  (C<mem_sys_free()> springs to mind, but
this causes C<make test> to break)

Many thanks in advance for any light anyone can shed on this issue!

Paul

[1] For those with access to the Coverity Prevent results, have a look
at CIDs 39, 32, 27, 26

Reply via email to