You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2009/10/17 16:27:14 UTC

svn commit: r826260 - /lucene/lucy/trunk/core/Lucy/Object/Err.bp

Author: marvin
Date: Sat Oct 17 14:27:14 2009
New Revision: 826260

URL: http://svn.apache.org/viewvc?rev=826260&view=rev
Log:
Fix order of operations bug leading to segfaults during abstract class check.

Modified:
    lucene/lucy/trunk/core/Lucy/Object/Err.bp

Modified: lucene/lucy/trunk/core/Lucy/Object/Err.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Object/Err.bp?rev=826260&r1=826259&r2=826260&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Object/Err.bp (original)
+++ lucene/lucy/trunk/core/Lucy/Object/Err.bp Sat Oct 17 14:27:14 2009
@@ -146,9 +146,10 @@
 {
     lucy_VTable *const my_vtable = *(lucy_VTable**)obj;
     if (my_vtable == vtable) {
-        Lucy_Obj_Dec_RefCount(obj);
-        LUCY_THROW(LUCY_ERR, "%o is an abstract class",
+        lucy_CharBuf *mess = LUCY_MAKE_MESS("%o is an abstract class",
             Lucy_Obj_Get_Class_Name(obj));
+        Lucy_Obj_Dec_RefCount(obj);
+        lucy_Err_throw_mess(LUCY_ERR, mess);
     }
 }