Page 1 of 1

issue-#143 inconsistent module list when CLOSE loads itself

Posted: Tue Dec 13, 2016 9:31 am
by Josef Templ
This has been reported by x512 on the community forum http://community.blackboxframework.org/ ... f=21&t=148.
Fir the issue see http://redmine.blackboxframework.org/issues/143.

In a pathological case, the CLOSE section of a module A may load
the module to be unloaded indirectly (via loading a module B that imports A).
The result is an inconsistent module list where a module B exists in the
module list but it's imported module A does not exist in the list.
Such a module A must not be unloaded but an error should be reported.
This situation is now checked after calling the terminator (CLOSE) of a module.
The resulting behavior is in line with the finalizer semantics and with the behavior
of a module terminator that generates a Trap:
the terminator of a module is called only once.

For the diff seehttp://redmine.blackboxframework.org/pr ... 47baadb6ad.

The case is pathological, of course, but possible and the fix is simple.
The reported follow-up traps of the inconsistent module list could not be
confirmed by my experiments and x512 did not reply to multiple requests for comments
(strange behavior, what happened to x512?).

Since an inconsistent module list even without follow-up traps is very strange,
I think this fix should be considered.

- Josef

Re: issue-#143 inconsistent module list when CLOSE loads its

Posted: Wed Dec 14, 2016 10:59 pm
by Robert
Josef Templ wrote:I think this fix should be considered.
Looks plausible to me.

Re: issue-#143 inconsistent module list when CLOSE loads its

Posted: Sun Dec 18, 2016 11:28 am
by Zinn
Does this change makes the change issue-#84 "unloading DevDebug produces a sequence of Traps" obsolete?
It looks like that DevDebug can be unloaded without Trap, when issue-#84 is cancelled.
- Helmut

Re: issue-#143 inconsistent module list when CLOSE loads its

Posted: Sun Dec 18, 2016 1:49 pm
by Josef Templ
Zinn wrote:Does this change makes the change issue-#84 "unloading DevDebug produces a sequence of Traps" obsolete?
It looks like that DevDebug can be unloaded without Trap, when issue-#84 is cancelled.
- Helmut
DevDebug does not have a CLOSE section, so it should not be affected by
this issue. Did you test it?

- Josef

Re: issue-#143 inconsistent module list when CLOSE loads its

Posted: Mon Dec 19, 2016 3:39 pm
by Zinn
Josef,
you are right. I test it again and my result from yesterday is not repeatable.
- Helmut

Re: issue-#143 inconsistent module list when CLOSE loads its

Posted: Fri Dec 30, 2016 1:12 pm
by Josef Templ
For me this issue is ready for voting.

- Josef

Re: issue-#143 inconsistent module list when CLOSE loads its

Posted: Fri Dec 30, 2016 7:08 pm
by DGDanforth
Vote created.