Fix recently introduced bugs in scav_vector()
commitbeb6a43d54cf90114097d133da74a14af12f1eca
authorDouglas Katzman <dougk@google.com>
Fri, 14 Apr 2017 01:59:19 +0000 (13 21:59 -0400)
committerDouglas Katzman <dougk@google.com>
Fri, 14 Apr 2017 01:59:19 +0000 (13 21:59 -0400)
tree77fed91f54dfb9f40d42a94e8a88bad918fdc7aa
parentd09dab3467bef285ff0ac9c767b2d6ce40ef06d1
Fix recently introduced bugs in scav_vector()

* It is totally wrong to call scavenge() on a hashtable instance,
  because scavenge() treats all words as either immediates or pointers.
  A hashtable has a raw single-float slot which will be skipped only by
  scav_instance. It's easy to see that some legal rehash thresholds
  cause is_lisp_pointer() to return true, such as 0.93750066 = #x3F70000B
  which resembles a fun-pointer on a 32-bit little-endian machine.
  This should have resulted in GC lossage, but amazingly the default
  rehash-threshold of 1.0 (= #x3F800000) either resembles an innocuous
  fixnum (little-endian), or doesn't point to a Lisp space (big-endian).

* In the "Warning: no pointer at %p in hash table ..." situation,
  the slack would not have been picked up correctly by heap_scavenge(),
  as it can not align to the next object after an odd number of words.
src/runtime/gc-common.c