[M3devel] uninitialized + insert_mn

Jay K jay.krell at cornell.edu
Tue Jun 1 18:00:41 CEST 2010


../src/runtime/common/RTCollector.m3: In function 'RTCollector__CleanOlderRefSanityCheck':
../src/runtime/common/RTCollector.m3:1724: warning: 'M3_EB9wjE_tc' is used uninitialized in this function
../src/runtime/common/RTCollector.m3: In function 'RTCollector__RefSanityCheck':
../src/runtime/common/RTCollector.m3:1702: warning: 'M3_EB9wjE_tc' is used uninitialized in this function


PROCEDURE RefSanityCheck (<*UNUSED*>v: RTHeapMap.Visitor;  cp  : ADDRESS) =
  VAR ref := LOOPHOLE(cp, UNTRACED REF RefReferent)^;
  BEGIN
    IF ref # NIL THEN
      VAR
        h  := HeaderOf(ref);
        tc := h.typecode;
      BEGIN


It is actually *kind of* true.
The store to tc uses load tc, insert_mn, store tc.


Any idea what to do?
offset=0
count=20


I'm willing to just go without -Wuninitialized, or look into turning it off for any function that uses insert.
Maybe look into what gcc uses -- hey, maybe bitfield refs? Yeah yeah, I'm half serious.
Of course I remember they caused a problem.
Perhaps we can use them, just be sure to twiddle the bit offsets depending on endian?


What I'm really doing is looking into removing the heavy use of volatile.


 - Jay

 		 	   		  


More information about the M3devel mailing list