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 pluginsSeverity: 3 - Normal
Item Group: crashStatus: Fixed
Privacy: PublicAssigned to: Sebastien Helleu <flashcode>
Originator Name: Open/Closed: Closed
Release: 0.4.2IRC nick: 

Add a New Comment (Rich MarkupRich 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 File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 09 Feb 2014 09:41:09 AM UTCflashcodeOpen/ClosedOpen=>Closed
    Wed 20 Nov 2013 07:45:15 AM UTCflashcodeCategoryother plugins=>script API plugins
      StatusNone=>Fixed
      Assigned toNone=>flashcode
      Release1.1-dev=>0.4.2
    Mon 18 Nov 2013 11:39:37 PM UTCpierrecarruAttached File-=>Added 0001-Prevent-guile-from-registering-its-gmp-custom-memory.patch, #29654

    Back to the top


    Powered by Savane 3.1-cleanup