[Gambas-user] Issue 252 in gambas: Enumerating Param for constant strings memory leak.

gambas at ...2524... gambas at ...2524...
Thu May 24 17:40:08 CEST 2012


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 252 by emil.len... at ...626...: Enumerating Param for constant  
strings memory leak.
http://code.google.com/p/gambas/issues/detail?id=252

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






More information about the User mailing list