TypeElement's members table gets corrupted by calling Elements.getAllMembers(...)

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P2
    • None
    • Affects Version/s: 6
    • Component/s: tools
    • None
    • generic
    • generic

      The problem is caused by calling sym.members().dupUnshared() in JavacElements.getAllMembers(...). This call creates a Scope with the new member table that shares its entries with the original member table. Now, imagine the situation that original_table[i] points to Entry1 that shadows Entry2. By adding closure type members to the newly created Scope in the JavacElements.getAllMembers(...) a necessity for dble() the new member table may appear. During dble() all entries of a new table are rehashed so that new_table[j] now points to Entry1, new_table[k] points to Entry2 and the shadow link between Entry1 and Entry2 is removed. However, since the entries were shared between the original and new tables, the original_table[i] still points to Entry1 and the link to Entry2 is lost.

            Assignee:
            Unassigned
            Reporter:
            Dušan Bálek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: