[krbdev.mit.edu #7860] libdb2 tests hang

Greg Hudson via RT rt-comment at krbdev.mit.edu
Sun Feb 16 19:52:22 EST 2014


Through a combination of debugging and googling, I believe the picture 
is this:

* The optimizer in gcc 4.8 breaks the BSD CIRCLEQ macros by optimizing 
out some of the conditionals.  This is either due to a strict aliasing 
violation in the CIRCLEQ macros or a compiler bug; at this time I'm not 
sure which.

* As a result, one of the mpool buckets becomes an infinite linked list, 
causing mpool_look() to iterate forever.

* The response to gcc 4.8 in OpenBSD (and I think also FreeBSD) has been 
to stop using the CIRCLEQ macros in favor of TAILQ.  It's not clear to 
me yet whether the TAILQ macros are better or worse in terms of strict 
aliasing violations, but gcc isn't known to have broken them yet.

* mpool structures are managed out of process memory, not mmapped 
memory, so we are free to make any changes we want to them.  Converting 
them from CIRCLEQ to TAILQ should be pretty easy if that turns out to be 
the best answer.

The thread starting at
http://mail-index.netbsd.org/tech-kern/2013/11/20/msg016059.html
has the most in-depth discussion I was able to find.


More information about the krb5-bugs mailing list