help-smalltalk
[Top][All Lists]
Advanced

[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)

Hi,

I looked into Paolo's patches and ran make check to see a crash in
the pools.st. But it turns out it is crashing due me upgrading to
GCC 4.8/Binutils 2.23.52.20130828-1  (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.

pools.st:
UndefinedObject>>#executeStatements.

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.


exceptions.st:

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)
-                  == (MCF_IS_METHOD_CONTEXT | MCF_IS_DISABLED_CONTEXT))
+  while UNCOMMON (/*!IS_NIL(newContextOOP) &&*/ (CONTEXT_FLAGS (newContext)
+                  == (MCF_IS_METHOD_CONTEXT | MCF_IS_DISABLED_CONTEXT)))
     {
       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


C-code:

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?


thanks
        holger



reply via email to

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