Community
Participate
Working Groups
Build ID: M20071023-1652 Steps To Reproduce: When loading and applying configuration data, a CSettingEntryFactory is created once and passed into each configuration. It's not cleared in between, and therefore the maps from the factory exist for the other build configs. It's not really clear to me exactly what this factory is for, but I do know that when not cleared, the values from the first config override those from other configs. The result is that the set of macros used in the scanner info for build config B is really the set of macros form build config A. The code was creating the factory, passing it to all configs, and then clearing it. That doesn't make much sense and I assume it was intended to clear it after each config. But again, I don't really understand the point of this factory to begin with. More information:
Created attachment 84544 [details] proposed patch Proposed patch which clears the factory between configs
Applied patch to HEAD and cdt_4_0
I believe that the real root cause was fixed in bug 284699. According to my findings CSettingEntryFactory is mere cache implemented to give you a challenge as multidimentional map. It is difficult to deal with multidimentional maps, especially with no generics in Java 1.4, and a bug slipped for macros where all macros with the same name were counted as same one.