On Wed, May 22, 2019 at 12:23 PM Hamad Ahmed <ahmed90@xxxxxxxxxx> wrote: > > The Boehm GC deals with the fact that the compiler uses offset calculation for accesses. It couldn't possibly work if it didn't. > > There are two inverse kinds of problems: > > A. failing to detect a pointer when it should > B. detecting a false pointer when it shouldn't > > If you had A, the collector would be > unsound. It would collect things that it shouldn't because they are still in > use. And it would attempt the reuse them. Programs would crash. If you follow > the rules of the Bohem GC, it *is* sound. And programs don't crash. A pointer > is only hidden from the GC if you illegally cast it away. The Boehm GC is > carefully written so that it sees correct pointers. What are the rules that must be followed? > The issue of floats looking like pointers is type B. If you had B, then it wouldn't be > unsound. It would just have a memory leak. It would fail to collect things > that it could. This is the definition of an imprecise collect: it can mistake > a non pointer for a pointer and thus fail to collect things that it > could. Such a non pointer could be a double. It could be a long. It could be > several adjacent chars or shorts or ints or floats. > > > The definition of a conservative collector is that it can make errors of type B but not A. > > > The issue at hand here is that pointers lingering in registers and stack are preventing collection. Which, by your taxonomy, is an error of type B. Why is this particular case more important than other type B errors? Ian