[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Weechat-dev] [bug #40628] Disable guile custom gmp custom allocator
From: |
Pierre Carru |
Subject: |
[Weechat-dev] [bug #40628] Disable guile custom gmp custom allocator |
Date: |
Mon, 18 Nov 2013 23:39:38 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.14 Safari/537.36 |
URL:
<http://savannah.nongnu.org/bugs/?40628>
Summary: Disable guile custom gmp custom allocator
Project: WeeChat
Submitted by: pierrecarru
Submitted on: lun. 18 nov. 2013 23:39:37 GMT
Category: other plugins
Severity: 3 - Normal
Item Group: crash
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 0.4.3-dev
IRC nick:
_______________________________________________________
Details:
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
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: lun. 18 nov. 2013 23:39:37 GMT Name:
0001-Prevent-guile-from-registering-its-gmp-custom-memory.patch Size: 833 o
By: pierrecarru
<http://savannah.nongnu.org/bugs/download.php?file_id=29654>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?40628>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [bug #40628] Disable guile custom gmp custom allocator,
Pierre Carru <=