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
issue-#143 inconsistent module list when CLOSE loads itself
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#143 inconsistent module list when CLOSE loads its
Looks plausible to me.Josef Templ wrote:I think this fix should be considered.
Re: issue-#143 inconsistent module list when CLOSE loads its
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
It looks like that DevDebug can be unloaded without Trap, when issue-#84 is cancelled.
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#143 inconsistent module list when CLOSE loads its
DevDebug does not have a CLOSE section, so it should not be affected byZinn 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
this issue. Did you test it?
- Josef
Re: issue-#143 inconsistent module list when CLOSE loads its
Josef,
you are right. I test it again and my result from yesterday is not repeatable.
- Helmut
you are right. I test it again and my result from yesterday is not repeatable.
- Helmut
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#143 inconsistent module list when CLOSE loads its
For me this issue is ready for voting.
- Josef
- Josef
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact: