[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Fun/Crashes with newer GCC on Debian

From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] Fun/Crashes with newer GCC on Debian
Date: Fri, 11 Oct 2013 08:08:57 +0200
User-agent: Mutt/1.5.21 (2010-09-15)


I looked into Paolo's patches and ran make check to see a crash in
the But it turns out it is crashing due me upgrading to
GCC 4.8/Binutils  (something in the layout
of the text changed and I see a new class of bugs).

I disabled the incremental and generational GC and used the address
sanitizer (I wondered if that is a good idea) and found some issues.

The code assume that _gst_curr_method->v_method.currentClass is a
valid class. It is NIL though. E.g. in instance_variable_index the
call to  _gst_instance_variable_array will actually access garbage
(and it started to crash for me).

Same goes for _gst_verify_method and CLASS_FIXED_FIELDS. I added
IS_NIL checks to make the asan report go away. I have no idea if
that is the right thing.

NIL is casted to a method context in disable_non_unwind_contexts.
I have added this. Judging from the loop above this patch, I assume
that newContextOOP will in deed be NIL at the bottom of the stack.

@@ -1232,13 +1232,15 @@ disable_non_unwind_contexts (OOP returnContextOOP)
   /* Skip any disabled methods.  */
-  while UNCOMMON (CONTEXT_FLAGS (newContext)
+  while UNCOMMON (/*!IS_NIL(newContextOOP) &&*/ (CONTEXT_FLAGS (newContext)
       oldContext = newContext;
       /* Descend in the chain...  */
       newContextOOP = oldContext->parentContext;
+      if (IS_NIL(newContextOOP))
+       break;
       newContext = (gst_method_context) OOP_TO_OBJ (newContextOOP);
       /* This context cannot be deallocated in a LIFO way.  We must


I get asan reports in _gst_grey_oop_range *page = *page;. With
generations off and NO_INCREMENTAL_GC set. Can't this be a NO-OP?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]