]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
Don't lock the VMG_LOADED mutex across global destruction
authorVincent Pit <vince@profvince.com>
Thu, 9 Apr 2015 18:12:26 +0000 (15:12 -0300)
committerVincent Pit <vince@profvince.com>
Tue, 14 Apr 2015 14:42:58 +0000 (11:42 -0300)
If this mutex falls back to the OP_REFCNT mutex, and that a coderef is
freed during global destruction, the mutex is taken twice and the process
hangs. As a general rule, it does not seem very safe so we just set
vmg_loaded to zero early and only run the global teardown callback if
it is zero. This ensures that this callback will only be called once.


No differences found