Closed Quuxplusone closed 14 years ago
Attached pointer_traits_workaround.diff
(979 bytes, text/plain): Workaround that sets the default available bits to 2 instead of 3
Why doesn't this cause an assertion?
That's what I was wondering too (see above). I'm planning to look into it.
One hypothetical possibility is the following:
- a ptrintpair gets constructed with an "opaque value"
- the tag value then gets read
- a decision gets made from the tag value
This might be happening in User::getUser() (implemented in Use.cpp:141) but as
far as I can tell the ptrintpairs aren't initialized in this manner.
I dropped the default to 2 bits:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090427/076954.html
And added a patch to clang to compensate for this:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090427/016609.html
I'm still curious why no assertion happens, it could be a miscompilation by
your host compiler or something.
OK. I still plan on looking into this. I also want to know why this didn't cause problems on Linux, since theoretically, it should have.
Note that the comment above that enum is now out-of-date.
For an explanation of what happened, see this thread:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-May/022056.html
pointer_traits_workaround.diff
(979 bytes, text/plain)