Leopold Toetsch <[EMAIL PROTECTED]> writes:

> Juergen Boemmels <[EMAIL PROTECTED]> wrote:
> 
> > It turned out, that it was even simpler. The explicit sweeping is
> > already in the code, but is only triggered if there are objects which
> > need _early_ destruction, not if objects just need
> > destruction. Removing this test made it work.
> 
> Why can't you call PIO_finish(DO_FLUSH) before the sweep?

Because the object in question is not in PIO_data. Its just a plain
PMC with a destroy-function. And this destroy-function was not run
until now. Some other bug was hiding that fact.

> I don't
> understand these workarounds. Also you mark the IOdata live, only that
> they are destroyed 3 lines later then.

Thats something completely different and I addmit it is a hack. When I
introduced this, I had problems with closing the three _standard_
handles to early. Maybe I don't need this hack any more because the
handles are now only flushed (not tested). But I left it in because
its a matter of correctness. One destroy-function which prints and the
problem is there again. The correct solution to this problem is
destruction ordering: The standard handles should be destroyed after
the interpreter (which isn't a PMC yet).

> If there are no objects that need timely destruction, the sweep is wasted
> time.
> 
> > Fix is commited.
> 
> Not IMHO.
> PIO_finish still does not release the standard handles and valgrind
> complains about invalid reads in PIO_flush_down.

I think this is one (or two) other problems. When I think about it, I
just flush the buffers, but do not free them. Will look at the code now.

bye
boe
-- 
Juergen Boemmels                        [EMAIL PROTECTED]
Fachbereich Physik                      Tel: ++49-(0)631-205-2817
Universitaet Kaiserslautern             Fax: ++49-(0)631-205-3906
PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F  23 F6 C7 2F 85 93 DD 47

Reply via email to