#27 Leak fixes

closed-accepted
None
5
2006-03-08
2006-02-20
No

Gaim encryption leaks like a leaky thing!

This patch fixes some of the worst cases (eg. leaking
~8 times the entire conversation history every time the
conversation updated callback is fired) -
gtk_text_buffer_get_text () allocates!

There are still a few outstanding leaks that I don't
have time or clue to figure out right now. Two of these
are related to smileys and state, FYI the valgrind
reports for these are (line numbers applicable with
this patch applied):

32 bytes in 2 blocks are definitely lost in loss record
793 of 2007
at 0x1B909222: malloc (vg_replace_malloc.c:130)
by 0x61AADF: g_malloc (in
/usr/lib/libglib-2.0.so.0.600.6)
by 0x1BFA6975: GE_get_state (state.c:38)
by 0x1BFA6A6C: GE_sync_state (state.c:134)
by 0x1BFA09C0: GE_updated_conv_cb (encrypt.c:1044)
by 0x1B964160: gaim_marshal_VOID__POINTER_UINT
(signals.c:641)
by 0x1B963D7F: gaim_signal_emit_vargs (signals.c:484)
by 0x1B963C39: gaim_signal_emit (signals.c:436)
by 0x1B93AD1F: gaim_conversation_update
(conversation.c:955)
by 0x1B93A3BA: gaim_conversation_set_logging
(conversation.c:689)
by 0x1B939659: gaim_conversation_new
(conversation.c:285)
by 0x8090573: gaim_gtkdialogs_im_with_user
(gtkdialogs.c:587)
by 0x806751B: gtk_blist_row_activated_cb
(gtkblist.c:783)

1896 (64 direct, 1832 indirect) bytes in 2 blocks are
definitely lost in loss record 1769 of 2007
at 0x1B909B71: calloc (vg_replace_malloc.c:175)
by 0x61AB4D: g_malloc0 (in
/usr/lib/libglib-2.0.so.0.600.6)
by 0x1BFA7195: create_smiley_if_absent (state_ui.c:212)
by 0x1BFA733B: GE_add_smiley (state_ui.c:265)
by 0x1BFA09B8: GE_updated_conv_cb (encrypt.c:1043)
by 0x1B964160: gaim_marshal_VOID__POINTER_UINT
(signals.c:641)
by 0x1B963D7F: gaim_signal_emit_vargs (signals.c:484)
by 0x1B963C39: gaim_signal_emit (signals.c:436)
by 0x1B93AD1F: gaim_conversation_update
(conversation.c:955)
by 0x1B93A0C1: gaim_conversation_set_title
(conversation.c:606)
by 0x1B93A215: gaim_conversation_autoset_title
(conversation.c:642)
by 0x808823A: gaim_gtkconv_update_fields
(gtkconv.c:5551)
by 0x8089A0C: update_conversation_switched
(gtkconv.c:6345)
by 0x1B9641E8: gaim_marshal_VOID__POINTER_POINTER
(signals.c:661)
by 0x1B963D7F: gaim_signal_emit_vargs (signals.c:484)
by 0x1B963C39: gaim_signal_emit (signals.c:436)
by 0x808BB8C: switch_conv_cb (gtkconv.c:7343)

Discussion

  • Don Seiler

    Don Seiler - 2006-02-20

    Logged In: YES
    user_id=61900

    Stu is my hero.

     
  • Bill Tompkins

    Bill Tompkins - 2006-02-21

    Logged In: YES
    user_id=21203

    Stu is my hero too. Holy cow there was a lot of crufty crap
    that you waded through to find those! Thanks for your
    perseverence tracking those down. Especially the NSS leaks
    that have been in there since...

    One of the patches I'm not sure about: the
    @@ -592,6 +592,7 @@ static gboolean GE_got_msg_cb(GaimAccoun
    + char *origmsg = *message;
    ...
    + g_free(origmsg);

    got_encrypted_msg() does a g_free() on *message before it is
    modified, and afaict shouldn't be leaking.

    I'll start digging on the valgrind reports you included.

    Thanks again,

    -Bill

     
  • Bill Tompkins

    Bill Tompkins - 2006-02-21
    • assigned_to: nobody --> obobo
    • status: open --> pending-accepted
     
  • Bill Tompkins

    Bill Tompkins - 2006-02-21

    Logged In: YES
    user_id=21203

    Ok, I think I've got those two. Time to start running
    Valgrind myself...

     
  • SourceForge Robot

    • status: pending-accepted --> closed-accepted
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks