unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.de>
Cc: jantien@xs4all.nl, guile-devel@gnu.org
Subject: Re: scm_gc_unprotect during GC
Date: Tue, 21 Sep 2004 23:23:54 +0200	[thread overview]
Message-ID: <87k6untixh.fsf@zagadka.ping.de> (raw)
In-Reply-To: <16706.21406.130861.89431@byrd.xs4all.nl> (Han-Wen Nienhuys's message of "Sat, 11 Sep 2004 03:23:42 +0200")

Han-Wen Nienhuys <hanwen@xs4all.nl> writes:

> A short term solution is to make sure that LilyPond never does
> scm_gc_unprotect_object() from smobbed destructor. However, I feel
> that this is a kludge.
>
> Either scm_gc_unprotect_object is callable during sweep, or this is
> forbidden. At present, GUILE does not print a warning, but barfs in an
> unrelated location.

Yes, that's unfortunate.  Almost anything is forbidden during sweep,
and we need to document that more clearly.

I'd say that a smob free function should not call
scm_gc_unprotect_object, or any other function that accesses the heap.
The heap might be in an inconsistent state, etc.  We probably should
list all functions that are callable, starting with just scm_gc_free.

Why do you need to call scm_gc_unprotect_object from your smob free
function?  To release a SCM value that was in use by the smob?  The
usual way to do that is to mark that value in the smob mark function.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2004-09-21 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-11  1:23 scm_gc_unprotect during GC Han-Wen Nienhuys
2004-09-21 21:23 ` Marius Vollmer [this message]
2004-09-24  9:24   ` Han-Wen Nienhuys

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=87k6untixh.fsf@zagadka.ping.de \
    --to=mvo@zagadka.de \
    --cc=guile-devel@gnu.org \
    --cc=jantien@xs4all.nl \
    /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).