From: Andy Wingo <wingo@pobox.com>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: guile-devel Development <guile-devel@gnu.org>
Subject: Re: thread safe functions
Date: Tue, 24 May 2011 22:57:56 +0200 [thread overview]
Message-ID: <m339k3olyj.fsf@unquote.localdomain> (raw)
In-Reply-To: <m3vd0rbkii.fsf@unquote.localdomain> (Andy Wingo's message of "Thu, 10 Feb 2011 23:19:17 +0100")
Hi Ken,
You mailed a long time ago with some threadsafety issues and I think
I've finally gotten to all of the ones you have mentioned.
You made good points regarding memory ordering also, but I'm going to
let that slide for now, as it didn't have specific bugs. Should you be
motivated to review further, please send separate mails. I know that
sounds silly but it looks less daunting that way.
On Thu 10 Feb 2011 23:19, Andy Wingo <wingo@pobox.com> writes:
> On Sun 29 Aug 2010 03:33, Ken Raeburn <raeburn@raeburn.org> writes:
>
>> I was starting to look through the port code for this, but got
>> distracted by scm_ptobs, a pointer which appears to be dynamically
>> reallocated as needed when scm_make_port_type is called. Which means
>> every function that reads it should be locking the same mutex used when
>> updating it; in this case, that appears to be the generic "critical
>> section" stuff, and it looks like we're not doing that.
>
> Yeah, and it is exported to users of libguile. Fun, no? I added a
> comment to the header about its impending deprecation, but that's all I
> have time for right now.
Actually this bug is still present.
>> smob.c: I don't think tramp_weak_map is adequately protected, but I'm
>> not certain.
Fixed.
>> srcprop.c: scm_source_whash isn't protected; it also appears to be
>> exposed by the name "source-whash" to Scheme code, which wouldn't be
>> able to use a mutex defined and used purely in the C code.
Fixed also.
>> struct.c: Even calling struct-vtable-name can cause a hash table entry
>> to be created, it appears. So that's not thread-safe, never mind the
>> call to actually change the name.
Fixed to a degree earlier; fixed more definitively now.
Happy hacking,
Andy
--
http://wingolog.org/
prev parent reply other threads:[~2011-05-24 20:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100805112743.GA1671@securactive.net>
[not found] ` <m3vd77vrs0.fsf@unquote.localdomain>
2010-08-22 0:57 ` thread safe functions Ken Raeburn
2010-08-28 19:20 ` Andy Wingo
2010-08-29 1:33 ` Ken Raeburn
2011-02-10 22:19 ` Andy Wingo
2011-02-15 16:00 ` Ken Raeburn
2011-05-23 20:25 ` Andy Wingo
2011-02-15 17:18 ` Ken Raeburn
2011-05-23 20:38 ` Andy Wingo
2011-05-24 20:57 ` Andy Wingo [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=m339k3olyj.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=raeburn@raeburn.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).