From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: thread assert with 1.8.2
Date: Thu, 04 Oct 2007 18:22:53 +0200 [thread overview]
Message-ID: <87k5q2svc2.fsf@chbouib.org> (raw)
In-Reply-To: 87d4vxv6a8.fsf@chbouib.org
[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]
Hi,
ludo@gnu.org (Ludovic Courtès) writes:
> But now, there's a similar issue in HEAD with `(ice-9 i18n)':
>
> PASS: locale objects: make-locale (2 args)
> PASS: locale objects: make-locale (2 args, list)
> PASS: locale objects: make-locale (3 args)
> guile: Error detected by libpthread: Unlocking unlocked mutex.
> Detected by file "/n0/gdt/NetBSD-4/src/lib/libpthread/pthread_mutex.c", line 363, function "pthread_mutex_unlock".
>
> Backtrace:
>
> #0 0xbba68fff in kill () from /usr/lib/libc.so.12
> #1 0xbb9dadb3 in pthread__errorfunc () from /usr/lib/libpthread.so.0
> #2 0xbb9d93f8 in pthread_mutex_unlock () from /usr/lib/libpthread.so.0
> #3 0xbb9cbaa0 in scm_make_locale (category_list=0x2, locale_name=0x80d6870, base_locale=0x204) at ../../libguile/i18n.c:436
OK, got this one too, and also a similar problem in `nl-langinfo' (see
attached patch).
HEAD now seems to work like a charm on NetBSD/i386, though it still
cannot be compiled with `-Werror' (patches welcome!).
Thanks,
Ludovic.
[-- Attachment #2: The patch --]
[-- Type: text/x-patch, Size: 1257 bytes --]
--- orig/libguile/ChangeLog
+++ mod/libguile/ChangeLog
@@ -1,3 +1,13 @@
+2007-10-04 Ludovic Courtès <ludo@gnu.org>
+
+ * i18n.c (scm_make_locale)[!USE_GNU_LOCALE_API]: Don't call
+ `leave_locale_section ()' on failure of
+ `enter_locale_section ()' since the mutex is not held and locale
+ settings are unchanged.
+ (scm_nl_langinfo)[!USE_GNU_LOCALE_API]: Use
+ `restore_locale_settings ()' instead of `leave_locale_section ()'
+ since the mutex is not held.
+
2007-10-02 Ludovic Courtès <ludo@gnu.org>
* threads.c (on_thread_exit): Don't call `scm_leave_guile ()'
--- orig/libguile/i18n.c
+++ mod/libguile/i18n.c
@@ -685,12 +685,14 @@
scm_t_locale_settings prev_locale;
err = enter_locale_section (c_locale, &prev_locale);
- leave_locale_section (&prev_locale);
if (err)
goto fail;
else
- SCM_NEWSMOB (locale, scm_tc16_locale_smob_type, c_locale);
+ {
+ leave_locale_section (&prev_locale);
+ SCM_NEWSMOB (locale, scm_tc16_locale_smob_type, c_locale);
+ }
}
#endif
@@ -1410,7 +1412,7 @@
{
c_result = nl_langinfo (c_item);
- leave_locale_section (&lsec_prev_locale);
+ restore_locale_settings (&lsec_prev_locale);
free_locale_settings (&lsec_prev_locale);
}
#endif
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
prev parent reply other threads:[~2007-10-04 16:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 0:56 thread assert with 1.8.2 Greg Troxel
2007-08-16 0:35 ` Kevin Ryde
2007-08-22 22:36 ` Ludovic Courtès
2007-08-22 23:39 ` Greg Troxel
2007-08-22 23:48 ` Greg Troxel
2007-10-02 16:18 ` Ludovic Courtès
2007-10-04 16:22 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k5q2svc2.fsf@chbouib.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).