[bug #40628] Disable guile custom gmp custom allocator

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #40628] Disable guile custom gmp custom allocator

Eric L.-2
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 mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[bug #40628] Disable guile custom gmp custom allocator

Eric L.-2
Update of bug #40628 (project weechat):

                Category:           other plugins => script API plugins    
                  Status:                    None => Fixed                  
             Assigned to:                    None => flashcode              
                 Release:               0.4.3-dev => 0.4.2                  


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?40628>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev