Commits

Anonymous committed 46b7a9e

Update issue 196

Comments (0)

Files changed (3)

src/tools/pmHeapDump.py

                               "locals:P:<sp"),
             PmTypeInfo("BLK", "sp:P,handler:P,type:B,next:P"),
             PmTypeInfo("SEG", "items:P:8,next:P"),
-            PmTypeInfo("SGL", "rootseg:P,lastseg:P,length:H"),
+            PmTypeInfo("SGL", "length:H,rootseg:P,lastseg:P"),
             PmTypeInfo("SQI", "sequence:P,index:H"),
             PmTypeInfo("NFM", "back:P,func:P,stack:P,active:B,numlocals:B,"
                               "locals:P:8"),
                  * Store the module's attrs/globals under the module's name
                  * in the global module dict (cache)
                  */
+                heap_gcPushTempRoot(pobj2, &objid);
                 retval = dict_setItem(pobj3, pobj1, pobj2);
+                heap_gcPopTempRoot(objid);
                 PM_BREAK_IF_ERROR(retval);
 
                 /* Put Module on top of stack */
 {
     /** object descriptor */
     PmObjDesc_t od;
+    /** index of (one past) last obj in last segment */
+    int16_t sl_length;
     /** ptr to first segment in list */
     pSegment_t sl_rootseg;
     /** ptr to last segment */
     pSegment_t sl_lastseg;
-    /** index of (one past) last obj in last segment */
-    int16_t sl_length;
 } Seglist_t,
  *pSeglist_t;