bugWeeChat - Bugs: bug #40628, Disable guile custom gmp custom...

 
 

bug #40628: Disable guile custom gmp custom allocator

Submitted by:  Pierre Carru <pierrecarru>
Submitted on:  Mon 18 Nov 2013 11:39:37 PM UTC  
 
Category:  script API plugins Severity:  3 - Normal
Item Group:  crash Status:  Fixed
Privacy:  Public Assigned to:  Sebastien Helleu <flashcode>
Originator Name:  Open/Closed:  Closed
Release:  0.4.2 IRC nick: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 18 Nov 2013 11:39:37 PM UTC, original submission:

Hello,

Guile musn't install its gmp custom allocator because it interfers with gnutls' use of gmp.
( see http://git.savannah.gnu.org/cgit/guile.git/commit/?id=b57bf2724a254cf73e255b3d2bca0a7dcad6674a )

Crashes can happen when freeing memory with an incorrect free memory function. Example:
1- relay plugin is loaded
2- ssl relay is created, gnutls allocates memory with its default allocator (malloc/free)
3- guile plugin is loaded, guile register its custom gmp allocators (custom_gmp_malloc/custom_gmp_free)
4- "/quit"
5- relay plugin deinits gnutls -> gnutls deinits gmp -> gmp tries frees memory. Some memory allocated with malloc is passed to custom_gmp_free which is not correct => possible segfault

I've attached a simple patch to prevent guile from registering its gmp allocators.

Cheers,
Pierre Carru

Pierre Carru <pierrecarru>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by flashcode (Updated the item)
  • -email is unavailable- added by pierrecarru (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-09 flashcode Open/ClosedOpen => Closed
    2013-11-20 flashcode Categoryother plugins => script API plugins
        StatusNone => Fixed
        Assigned toNone => flashcode
        Release2.2-dev => 0.4.2
    2013-11-18 pierrecarru Attached File- => Added 0001-Prevent-guile-from-registering-its-gmp-custom-memory.patch, #29654

    Back to the top


    Powered by Savane 3.3