From: <eri...@us...> - 2017-10-16 11:29:34
|
Revision: 11312 http://sourceforge.net/p/oorexx/code-0/11312 Author: erich_st Date: 2017-10-16 11:29:32 +0000 (Mon, 16 Oct 2017) Log Message: ----------- The hang trace pinpointed a place where objects were being allocated without holding the lock. This patch might fix the problem Modified Paths: -------------- main/trunk/interpreter/concurrency/Activity.cpp Modified: main/trunk/interpreter/concurrency/Activity.cpp =================================================================== --- main/trunk/interpreter/concurrency/Activity.cpp 2017-10-14 18:37:55 UTC (rev 11311) +++ main/trunk/interpreter/concurrency/Activity.cpp 2017-10-16 11:29:32 UTC (rev 11312) @@ -1780,9 +1780,16 @@ void Activity::nestAttach() { attachCount++; + // Creating the activation stack needs to allocate objects, so we need go grab + // the kernel lock before doing this + requestAccess(); // create the base marker for anchoring any objects returned by // this instance. createNewActivationStack(); + // we're in a state here where we need the access for a short window to + // allocate the objects for the stack, but we will be requesting it again + // once the nesting is complete, so we need to release it again now. + releaseAccess(); } |