google-code-export / gambas

Automatically exported from code.google.com/p/gambas
1 stars 0 forks source link

Enumerating Param for constant strings memory leak. #252

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1) Describe the problem.
This code results in "gbx3: warning: 2 allocation(s) non freed." since revision 
4248.

' Gambas module file

Public Function varargs(...)
  Dim v As Variant
  For Each v In Param
    Print v
  Next
End

Public Sub Main()
  varargs("Testing a problem string.")
End

According to Valgrind, the allocation stack backtrace is
malloc
my_malloc
STRING_new
VALUE_convert
GB_ReturnConvVariant
EXEC_native
EXEC_special
EXEC_enum_next
EXEC_loop
EXEC_function_real
main

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: TRUNK
Revision: r4248

Original issue reported on code.google.com by emil.len...@gmail.com on 24 May 2012 at 3:39

GoogleCodeExporter commented 9 years ago
Fixed in revision #4788.

Original comment by benoit.m...@gmail.com on 28 May 2012 at 8:09

GoogleCodeExporter commented 9 years ago

Original comment by benoit.m...@gmail.com on 28 May 2012 at 8:09