guile-user
[Top][All Lists]
Advanced

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

Re: Foreign wrapped C structures and guardians


From: Patrick Bernaud
Subject: Re: Foreign wrapped C structures and guardians
Date: Mon, 30 Jul 2012 18:59:08 +0200

Hello,

Daniel Hartwig writes:
 > [...]
 > Your guardian test should work but on my system it is broken also.

Thank you for confirming the problem. I have now stripped the test a
bit more and filed a bug report [1] with it.


 > The libguile function scm_malloc will allocate memory that the
 > collector avoids.  You can then copy the data to this:
 > 
 > (define malloc
 >   (let ((this (dynamic-link)))
 >     (pointer->procedure '*
 >                         (dynamic-func "scm_malloc" this)
 >                         (list size_t))))
 > [...]

Good tip, I may end up using something like this since, ultimately, I
would rather not have allocators in C.


 > [...]
 > Although the guardian should be protecting this, it does appear not to
 > in your test.scm.  If I use --fresh-auto-compile it works fine.

Indeed, I also can not make it to fail with auto compilation turned
on.

Regards,


[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12095

-- 
Patrick Bernaud



reply via email to

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