emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#18065: closed (guile hangs if strerror is called w


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#18065: closed (guile hangs if strerror is called with invalid (non-int) argument)
Date: Wed, 12 Nov 2014 06:08:02 +0000

Your message dated Wed, 12 Nov 2014 01:05:53 -0500
with message-id <address@hidden>
and subject line Re: bug#18065: guile hangs if strerror is called with invalid 
(non-int) argument
has caused the debbugs.gnu.org bug report #18065,
regarding guile hangs if strerror is called with invalid (non-int) argument
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
18065: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18065
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: guile hangs if strerror is called with invalid (non-int) argument Date: Sun, 20 Jul 2014 11:25:11 -0400
Calling strerror with a non-integer argument causes guile to hang.
e.g.:

(strerror 1.5)

It's a locking issue, which is solved by the following trivial patch:

--- a/libguile/error.c
+++ b/libguile/error.c
@@ -121,10 +121,12 @@ SCM_DEFINE (scm_strerror, "strerror", 1, 0, 0,
 #define FUNC_NAME s_scm_strerror
 {
   SCM ret;
+  int errnum;
   scm_dynwind_begin (0);
+  errnum = scm_to_int (err);
   scm_i_dynwind_pthread_mutex_lock (&scm_i_misc_mutex);
 
-  ret = scm_from_locale_string (strerror (scm_to_int (err)));
+  ret = scm_from_locale_string (strerror (errnum));
 
   scm_dynwind_end ();
   return ret;



--- End Message ---
--- Begin Message --- Subject: Re: bug#18065: guile hangs if strerror is called with invalid (non-int) argument Date: Wed, 12 Nov 2014 01:05:53 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Fixed in fda17c20a3d088fccab1671c8881bd217d83d5f6 on the stable-2.0
branch, which will become Guile 2.0.12.

     Thanks,
       Mark


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]