Permalink
Browse files

Correct slot access for ObjFuncPtr.

* mod PyrGC::Finalize(...) :  use slotRawPtr instead of slotRawInt otherwise might lead to a crash when finalizable objects are collected

git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@9914 a380766d-ff14-0410-b294-a243070f3f08
  • Loading branch information...
Charles Picasso
Charles Picasso committed Mar 1, 2010
1 parent 264ecf2 commit b00b730f6dd2573282f9dec7e10f768847e07651
Showing with 1 addition and 1 deletion.
  1. +1 −1 common/Source/lang/LangSource/GC.cpp
@@ -758,7 +758,7 @@ void PyrGC::Finalize(PyrObject *finalizer)
if (!IsPtr(finalizer->slots+0)) return;
if (!IsObj(finalizer->slots+1)) return;
- ObjFuncPtr func = (ObjFuncPtr)slotRawInt(&finalizer->slots[0]);
+ ObjFuncPtr func = (ObjFuncPtr)slotRawPtr(&finalizer->slots[0]);
PyrObject *obj = slotRawObject(&finalizer->slots[1]);
//post("FINALIZE %s %p\n", slotRawSymbol(&obj->classptr->name)->name, obj);
(func)(mVMGlobals, obj);

0 comments on commit b00b730

Please sign in to comment.