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


bug #40628: Disable guile custom gmp custom allocator

Submitter:  Pierre Carru <pierrecarru>
Submitted:  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:  flashcode
Originator Name:  Open/Closed:  Closed
Release:  * 0.4.2 IRC nick: 
* Mandatory Fields

Add a New Comment Rich Markup

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


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.

Pierre Carru

Pierre Carru <pierrecarru>


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

Attach Files:

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)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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
        Release3.3-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.13-758e.
    Corresponding source code