After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353959 - Leak of strings from activation_environment
Leak of strings from activation_environment
Status: RESOLVED INCOMPLETE
Product: bonobo
Classification: Deprecated
Component: general
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: Michael Meeks
bonobo qa
Depends on:
Blocks:
 
 
Reported: 2006-09-02 12:29 UTC by Chris Wilson
Modified: 2008-08-28 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
memcpy the old_buffer (1.25 KB, patch)
2006-09-02 12:30 UTC, Chris Wilson
needs-work Details | Review

Description Chris Wilson 2006-09-02 12:29:04 UTC
==16524== 71 bytes in 6 blocks are possibly lost in loss record 74 of 174
==16524==    at 0x40053D0: malloc (vg_replace_malloc.c:149)
==16524==    by 0x48AA8DC: standard_malloc (gmem.c:84)
==16524==    by 0x48AADF5: g_malloc (gmem.c:131)
==16524==    by 0x478BB5F: ORBit_alloc_string (in /usr/lib/libORBit-2.so.0.1.0)
==16524==    by 0x478B828: CORBA_string_dup (in /usr/lib/libORBit-2.so.0.1.0)
==16524==    by 0x41C998A: Bonobo_ActivationEnvValue_set (in /usr/lib/libbonobo-activation.so.4.0.0)
==16524==    by 0x41C75F7: bonobo_activation_init_activation_env (in /usr/lib/libbonobo-activation.so.4.0.0)
==16524==    by 0x41CB6E3: bonobo_activation_orb_init (in /usr/lib/libbonobo-activation.so.4.0.0)
==16524==    by 0x41526C2: (within /usr/lib/libgnome-2.so.0.1501.1)
==16524==    by 0x414C833: gnome_program_postinit (in /usr/lib/libgnome-2.so.0.1501.1)
==16524==    by 0x414E814: (within /usr/lib/libgnome-2.so.0.1501.1)
==16524==    by 0x414EB28: gnome_program_init (in /usr/lib/libgnome-2.so.0.1501.1)


which appears to be caused when copying the activation_environment._buffer as Bonobo_ActivationEnvValue_copy does a strdup on name+value but the old_buffer strings are not freed.

Performing a simple memcpy of the old_buffer should be sufficient.
Comment 1 Chris Wilson 2006-09-02 12:30:26 UTC
Created attachment 72073 [details] [review]
memcpy the old_buffer
Comment 2 Kjartan Maraas 2006-11-25 01:31:29 UTC
Michael, please take a look at this patch
Comment 3 Michael Meeks 2006-12-12 12:12:38 UTC
patch looks good to me.
Comment 4 Kjartan Maraas 2006-12-14 09:27:52 UTC
Commited.
Comment 5 Fernando Herrera 2006-12-15 13:58:41 UTC
with this patch nautilus does not star anymore., it gives this error:

           message = _("Nautilus can't be used now, due to an unexpected error.");
                                detailed_message = _("Nautilus can't be used now, due to an unexpected error "
                                                     "from Bonobo when attempting to locate the factory."
                                                     "Killing bonobo-activation-server and restarting Nautilus may help fix the problem.");

reverting the patch makes nautilus (HEAD) works fine.

re-opening and setting priority
Comment 6 Kjartan Maraas 2006-12-15 14:44:07 UTC
This was reverted in CVS now. Please investigate a proper fix for the problem :-)
Comment 7 Fernando Herrera 2006-12-15 16:27:29 UTC
thanks a lot, lowing priority and severity
Comment 8 Kjartan Maraas 2006-12-16 00:11:47 UTC
Marking patch as 'needs-work'
Comment 9 Kjartan Maraas 2007-01-25 11:19:02 UTC
Any news on this? 
Comment 10 Kjartan Maraas 2008-08-28 11:04:32 UTC
Closing this then.