Bugzilla – Bug 17
possible compiler bug causing loss of tags registry information
Last modified: 2007-04-19 04:59:06 UTC
Basically, after some hours of debugging i discovered that TagRegistry::m_registry was being initialized twice in the same program, causing loss of information added to it before the second initialization. I suspect a compiler bug, but in any case it was very easy to work around it by lazy-initializing the vector. I committed a patch to my tree; feel free to include it upstream if you want.
Created attachment 10 [details] the patch
I would like to see a test-case which shows the bug first. i.e., if you are willing to send me the code, I can look into this.
I have pushed a similar although more complete patch to lazyly initialize m_sorted too. The real issue here I think is that this code could be subject to static variable initialization order problems which might have looked like a double initialization problem to you. So, it would be nice to get some testing feedback on the version I pushed. Marking bug as fixed.