# New Ticket Created by  Steve Fink 
# Please include the string:  [perl #16851]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=16851 >


This patch disables the possibly spurious warnings reported by
GC_DEBUG when walking the system stack. With it, you can run make test
and not have bogus failures because the warning message got mixed up
in the output. Change GC_VERBOSE to 1 to see all possible problems.



-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/36033/29149/36cccb/gc_verbose.patch

? .timestamp
? MANIFEST.u
? Makefile.in-1.142
? Makefile.in-mine-1.142
? Test
? Types.pm.diff
? assemble.pl.diff
? crap.c
? libparrot.def
? life
? life.c
? noop.asm
? noop.pbc
? pbc2c.pl.diff
? stest.pbc
? test
? test_gnuc
? test_parrot
? testbyteorder
? testparrotfuncptr
? testparrotsizes
? tree
? xxx.pasm
? xxx.pbc
? languages/regex/test.pasm
? languages/regex/test.pbc
? t/src/basic_1.
? t/src/basic_1.c
? t/src/basic_2.
? t/src/basic_2.c
Index: include/parrot/dod.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/dod.h,v
retrieving revision 1.2
diff -p -u -r1.2 dod.h
--- include/parrot/dod.h        23 Aug 2002 07:55:22 -0000      1.2
+++ include/parrot/dod.h        29 Aug 2002 19:14:54 -0000
@@ -47,6 +47,9 @@ buffer_lives(Buffer *buffer)
          * If it *is* a bug, you may want to read the notes in
          * get_free_buffer() in headers.c for tips on debugging using
          * gdb with this pointer and version number. */        
+#if ! GC_VERBOSE
+        if (! CONSERVATIVE_POINTER_CHASING)
+#endif
         fprintf(stderr, "GC Warning! Live buffer %p version " INTVAL_FMT " found on 
free list\n", buffer, buffer->version);
         assert(CONSERVATIVE_POINTER_CHASING);
     }
Index: include/parrot/parrot.h
===================================================================
RCS file: /cvs/public/parrot/include/parrot/parrot.h,v
retrieving revision 1.48
diff -p -u -r1.48 parrot.h
--- include/parrot/parrot.h     23 Aug 2002 13:46:21 -0000      1.48
+++ include/parrot/parrot.h     29 Aug 2002 19:14:56 -0000
@@ -155,6 +155,12 @@ typedef void (*funcptr_t)(void);
  * to occur more frequently. It does significantly reduce performance. */
 #define GC_DEBUG 0
 
+/* If you're really digging into things, then turn on GC_VERBOSE to
+ * see warning messages for stuff that might, or might not, be a
+ * problem. (See dod.h) This is disabled by default because the
+ * warning messages cause many tests to fail. */
+#define GC_VERBOSE 0
+
 #include "parrot/platform.h"
 #include "parrot/global_setup.h"
 #include "parrot/interpreter.h"

Reply via email to