On Wed, Jul 20, 2011 at 10:40 AM, Chris Smith <cdsmith@gmail.com> wrote:
I have looked up crowbar in a number of dictionaries of slang and
informal usage... and still have no idea what you just said. Can you
reword it?
Crowbars offer 'leverage'.
The point, I think, is that if pointer equality testing really does what
it says, then there shouldn't *be* any correct implementation in which
false positives are possible. It seems the claim is that the garbage
collector might be moving things around, have just by chance happened to
place the second value in the spot formerly occupied by the first, and
have not updated the first pointer yet. But if that's the case, and
it's executing arbitrary user code that may refer to that memory, then
the garbage collector contains race conditions!
You assume that the GC uses the same primitive as the developer, and is inherently subject to its own race conditions.
But Bertram has said that false positives are not possible. I can only assume that the pointer comparison is atomic with respect to the GC.