)]}'
{
  "commit": "002957be18e3b34e3e4863279335f58ae357cee5",
  "tree": "82b3ec1ba30c626143053bcbcfd75890fc53c69d",
  "parents": [
    "75e514cfa56c202d4d481626c1f0ba74eb61ff86"
  ],
  "author": {
    "name": "Nick Alcock",
    "email": "nick.alcock@oracle.com",
    "time": "Fri May 30 15:26:26 2025 +0100"
  },
  "committer": {
    "name": "Nick Alcock",
    "email": "nick.alcock@oracle.com",
    "time": "Wed Jun 04 12:51:24 2025 +0100"
  },
  "message": "libctf: dedup: improve hiding of conflicting types in the same dict\n\nIf types are conflicting, they are usually moved into separate child dicts\n-- but not always.  If they are added to the same dict by the cu-mapping\nmechanism (as used e.g. for multi-TU kernel modules), we can easily end\nup adding multiple conflicting types with the same name to the same dict.\n\nThe mechanism used for turning on the non-root-visible flag in order to do\nthis had a kludge attached which always hid types with the same name,\nwhether or not they were conflicting.  This is unnecessary and can hide\ntypes that should not be hidden, as well as hiding bugs.  Remove it, and\nreplace it with two different approaches:\n\n - for everything but cu-mapped links (the in-memory first phase of a link\n   with ctf_link_add_cu_mapping in force), check for duplicate names if\n   types are conflicting, and mark them as hidden if the names are found.\n   This will never happen in normal links (in an upcoming commit we will\n   suppress doing even this much in such cases).\n\n - for cu-mapped links, the only case that merges multiple distinct target\n   dicts into one, we apply a big hammer and simply hide everything!  The\n   non-root flag will be ignored in the next link phase anyway (which dedups\n   the cu-mapped pieces against each other), and this way we can be sure\n   that merging multiple types cannot incur name clashes at this stage.\n\nThe result seems to work: the only annoyance is that when enums with\nconflicting enumerators are found in a single cu-mapped child (so, really\nmultiple merged children), you may end up with every instance of that enum\nbeing hidden for reasons of conflictingness.  I don\u0027t see a real way to\navoid that.\n\nlibctf/\n\tPR libctf/33047\n\t* ctf-dedup.c (ctf_dedup_emit_type): Only consider non\n\tconflicting types.  Improve type hiding in the presence of clashing\n\tenumerators.  Hide everything when doing a cu-mapped link: they will\n\tbe unhidden by the next link pass if nonconflicting.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e442f59ea4c1d17bc5b9223c1f4fb15f58796533",
      "old_mode": 33188,
      "old_path": "libctf/ctf-dedup.c",
      "new_id": "5a3c7bd6af260dd29b378ca18d409e047cc11bc4",
      "new_mode": 33188,
      "new_path": "libctf/ctf-dedup.c"
    }
  ]
}
