From: Andy Wingo <wingo@igalia.com>
To: Doug Evans <xdje42@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 9/9] Remove a useless Guile finalizer
Date: Thu, 17 Apr 2014 10:07:00 -0000 [thread overview]
Message-ID: <8738hcs1zn.fsf@igalia.com> (raw)
In-Reply-To: <m3ob06s3ne.fsf@sspiff.org> (Doug Evans's message of "Sat, 12 Apr 2014 13:18:13 -0700")
On Sat 12 Apr 2014 22:18, Doug Evans <xdje42@gmail.com> writes:
> Andy Wingo <wingo@igalia.com> writes:
>
>> * gdb/guile/scm-symtab.c (stscm_free_sal_smob): Remove useless free
>> function. (This was the only useless free function.)
>
> How useful is valgrind with Guile's GC?
It seems to work fine now, and in my recollection, but I haven't used
memcheck in anger recently. I usually use callgrind ;). The GC heap
doesn't present any problems for it. Conservative root scanning on the
stack and in the static data sections is an issue; you have to add some
things to the suppressions for sanity.
> And given that we have this hook, it seems a shame to just throw out
> such useful protections against use-after-free (I'm pretty sure early on
> I found one bug with them), especially given the subtleties with GC,
> and gdb's extensive need to have references to SCM objects from outside
> GC-controlled code.
Thing is, you don't control very much about the environment of the
finalizer. In particular it could be called from some other thread, and
in general a finalizer runs concurrently with arbitrary other parts of
your program; see
http://wingolog.org/archives/2012/02/16/unexpected-concurrency for some
discussion. Avoiding finalizers can actually improve correctness in
this regard.
> If we're going to have a rule that such code is disallowed,
> there is more such code that needs to be removed besides the above
> (grep for "catch bugs").
Sure. I think I looked for finalizers that _only_ had this kind of
body, and this was the only one. It's harmless otherwise. Finalizers
do impose a perf penalty on the GC, but it's much less than mark
functions.
Andy
next prev parent reply other threads:[~2014-04-17 10:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-09 16:14 [PATCH 0/8] Cleanups to Guile extension interface Andy Wingo
2014-04-09 16:14 ` [PATCH 6/9] Remove Guile GDB object property mechanism Andy Wingo
2014-04-12 19:23 ` Doug Evans
2014-04-17 9:54 ` Andy Wingo
2014-04-09 16:14 ` [PATCH 4/9] Fix typos in documentation of Guile `execute' function Andy Wingo
2014-04-09 16:14 ` [PATCH 7/9] Remove Guile mark functions that don't mark anything Andy Wingo
2014-04-12 19:29 ` Doug Evans
2014-04-17 9:48 ` Andy Wingo
2014-04-20 19:34 ` Doug Evans
2014-04-22 7:40 ` Andy Wingo
2014-04-29 11:51 ` Ludovic Courtès
2014-04-09 16:14 ` [PATCH 9/9] Remove a useless Guile finalizer Andy Wingo
2014-04-12 20:18 ` Doug Evans
2014-04-14 12:12 ` Ludovic Courtès
2014-04-14 21:39 ` Doug Evans
2014-04-15 9:29 ` Ludovic Courtès
2014-04-15 15:30 ` Doug Evans
2014-04-17 10:07 ` Andy Wingo [this message]
2014-04-09 16:14 ` [PATCH 8/9] Remove useless Guile SMOB marking functions Andy Wingo
2014-04-12 19:50 ` Doug Evans
2014-04-09 16:14 ` [PATCH 1/9] Allow GDB to build against unreleased Guile 2.2 Andy Wingo
2014-04-12 16:40 ` Doug Evans
2014-04-12 16:47 ` Doug Evans
2014-04-17 9:04 ` Andy Wingo
2014-04-09 16:14 ` [PATCH 2/9] Define and export Guile classes for all GDB object types Andy Wingo
2014-04-12 18:32 ` Doug Evans
2014-04-09 16:14 ` [PATCH 3/9] Fix excess parentheses in Guile extension examples Andy Wingo
2014-04-09 16:14 ` [PATCH 5/9] Rename "gsmob" in Guile interface to "gdb object" Andy Wingo
2014-04-12 18:46 ` Doug Evans
2014-04-17 9:39 ` Andy Wingo
2014-04-17 9:46 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2014-04-09 16:09 [PATCH 0/8] Cleanups to Guile extension interface Andy Wingo
2014-04-09 16:09 ` [PATCH 9/9] Remove a useless Guile finalizer Andy Wingo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738hcs1zn.fsf@igalia.com \
--to=wingo@igalia.com \
--cc=gdb-patches@sourceware.org \
--cc=xdje42@gmail.com \
/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