Many thanks!
I'll take care of it ASAP.
Regards,
Vivien

On 8 April 2014 16:20, Adrien Schwartzentruber <
[email protected]> wrote:

> Hello,
>
> I updated a previous bug entry who is in the same scope than the mentioned
> memory leaks.
>
> I also added a patch file, it fix these leaks for me. Thx to test and
> commit.
>
> https://bugzilla.gnome.org/show_bug.cgi?id=711301
>
> Regards
>
> Adrien.
>
>
> On Sat, Apr 5, 2014 at 7:14 PM, Vivien Malerba <[email protected]> wrote:
>
>> Hi!
>>
>> Looking at the code, it seems this has not been corrected. Can you file a
>> bug report in Mozilla?
>> Can you also specify which version you are using, and if possible the
>> part of you database schema which the code refers to?
>>
>> Thanks,
>>
>> Vivien
>>
>>
>> On 5 April 2014 10:31, Adrien Schwartzentruber <
>> [email protected]> wrote:
>>
>>> Hello guys,
>>>
>>> I did some memory test using valgrind, and it turns out that i found few
>>> memory leaks. I can of course add these bug in bugzilla, but I want to have
>>> the confirmation that these bugs aren't already fixed, and in the first
>>> case, if the proposition is correct.
>>>
>>> 1. GdaConnectionEvent
>>>
>>> Valgrind stack trace :
>>>
>>>  ==00:00:00:07.808 3268== 820 (320 direct, 500 indirect) bytes in 10
>>> blocks are definitely lost in loss record 2,219 of 2,365
>>> ==00:00:00:07.808 3268== at 0x4C2B6CD: malloc (in
>>> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>>> ==00:00:00:07.808 3268== by 0x4E7FA38: g_malloc (gmem.c:159)
>>> ==00:00:00:07.808 3268== by 0x4E92C72: g_slice_alloc (gslice.c:1003)
>>> ==00:00:00:07.808 3268== by 0x4E931B5: g_slice_alloc0 (gslice.c:1029)
>>> ==00:00:00:07.808 3268== by 0x5AF0889: g_type_create_instance
>>> (gtype.c:1872)
>>> ==00:00:00:07.808 3268== by 0x5AD50B8: g_object_constructor
>>> (gobject.c:1849)
>>> ==00:00:00:07.808 3268== by 0x5AD66E3: g_object_newv (gobject.c:1713)
>>> ==00:00:00:07.808 3268== by 0x5AD6EC5: g_object_new_valist
>>> (gobject.c:1830)
>>> ==00:00:00:07.808 3268== by 0x5AD71D3: g_object_new (gobject.c:1545)
>>> ==00:00:00:07.808 3268== by 0x51690CD:
>>> gda_connection_point_available_event (gda-connection.c:2606)
>>> ==00:00:00:07.808 3268== by 0xAD17585:
>>> gda_mysql_provider_statement_execute (gda-mysql-provider.c:2812)
>>> ==00:00:00:07.808 3268== by 0x51705F8:
>>> gda_connection_statement_execute_v (gda-connection.c:3544)
>>> ==00:00:00:07.808 3268== by 0x517200B: gda_connection_statement_execute
>>> (gda-connection.c:3725)
>>> ==00:00:00:07.808 3268== by 0x54F8378: ast_db_record_new_full
>>> (ast_db.c:652)
>>> ==00:00:00:07.808 3268== by 0x400909: main (main.c:24)
>>>
>>> Correction :
>>>
>>> --- a/providers/mysql/gda-mysql-provider.c
>>> +++ b/providers/mysql/gda-mysql-provider.c
>>> @@ -2826,6 +2826,11 @@ gda_mysql_provider_statement_execute
>>> (GdaServerProvider *provider,
>>> *last_inserted_row = make_last_inserted_set (cnc, stmt, last_row);
>>> }
>>>
>>>  + //Memory leak correction
>>> + if (event) {
>>> + g_object_unref(event);
>>> + }
>>>
>>> 2. GdaStatementSelect :
>>>
>>> Valgrind stack trace :
>>>
>>> ==00:00:00:07.942 18943==    at 0x4C29DB4: calloc (in
>>> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>>>
>>> ==00:00:00:07.942 18943==    by 0x4E7FAA0: g_malloc0 (gmem.c:189)
>>>
>>> ==00:00:00:07.942 18943==    by 0x51E9DCD: gda_sql_statement_select_new
>>> (gda-statement-struct-select.c:60)
>>>
>>> ==00:00:00:07.942 18943==    by 0x51E3AED: gda_sql_statement_new
>>> (gda-statement-struct.c:112)
>>>
>>> ==00:00:00:07.942 18943==    by 0xAD181F7:
>>> gda_mysql_provider_statement_execute (gda-mysql-provider.c:2019)
>>>
>>> ==00:00:00:07.942 18943==    by 0x51705F8:
>>> gda_connection_statement_execute_v (gda-connection.c:3544)
>>>
>>> ==00:00:00:07.942 18943==    by 0x517200B:
>>> gda_connection_statement_execute (gda-connection.c:3725)
>>>
>>> ==00:00:00:07.942 18943==    by 0x54F8378: ast_db_record_new_full
>>> (ast_db.c:652)
>>>
>>> ==00:00:00:07.942 18943==    by 0x40095C: main (main.c:24)
>>> 3. GdaRender
>>>
>>>  at 0x4C2B6CD: malloc (in
>>> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>>> ==00:00:00:07.941 18943==    by 0x4E7FA38: g_malloc (gmem.c:159)
>>> ==00:00:00:07.941 18943==    by 0x4E92C72: g_slice_alloc (gslice.c:1003)
>>> ==00:00:00:07.941 18943==    by 0x4E93F92: g_slist_append (gslist.c:222)
>>> ==00:00:00:07.941 18943==    by 0x51BF065: default_render_param_spec
>>> (gda-statement.c:1395)
>>> ==00:00:00:07.941 18943==    by 0xAD13E8E: mysql_render_expr
>>> (gda-mysql-provider.c:1647)
>>> ==00:00:00:07.941 18943==    by 0xAD163CE: mysql_render_insert
>>> (gda-mysql-provider.c:1565)
>>> ==00:00:00:07.941 18943==    by 0xAD155DF:
>>> gda_mysql_provider_statement_to_sql (gda-mysql-provider.c:1484)
>>> ==00:00:00:07.941 18943==    by 0xAD1569F: real_prepare
>>> (gda-mysql-provider.c:1826)
>>> ==00:00:00:07.941 18943==    by 0xAD159DC:
>>> gda_mysql_provider_statement_prepare (gda-mysql-provider.c:1917)
>>> ==00:00:00:07.941 18943==    by 0xAD17386:
>>> gda_mysql_provider_statement_execute (gda-mysql-provider.c:2208)
>>> ==00:00:00:07.941 18943==    by 0x51705F8:
>>> gda_connection_statement_execute_v (gda-connection.c:3544)
>>> ==00:00:00:07.941 18943==    by 0x517200B:
>>> gda_connection_statement_execute (gda-connection.c:3725)
>>> ==00:00:00:07.941 18943==    by 0x54F8378: ast_db_record_new_full
>>> (ast_db.c:652)
>>> ==00:00:00:07.941 18943==    by 0x40095C: main (main.c:24)
>>>
>>>
>>> Attached : Code sample
>>>
>>>
>>> _______________________________________________
>>> gnome-db-list mailing list
>>> [email protected]
>>> https://mail.gnome.org/mailman/listinfo/gnome-db-list
>>>
>>>
>>
>
_______________________________________________
gnome-db-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to