Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6477587

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 6
    • 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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: