)]}'
{
  "commit": "9b0ccb1ebaef7474d4f7242f778531ef042a55fc",
  "tree": "4dd6c055de7493aea71715adb96e2003b2977dec",
  "parents": [
    "7e1b5887642d6c7c341c2db09ae912041d670a79"
  ],
  "author": {
    "name": "Mark Wielaard",
    "email": "mark@klomp.org",
    "time": "Tue May 02 20:23:32 2023 +0200"
  },
  "committer": {
    "name": "Mark Wielaard",
    "email": "mark@klomp.org",
    "time": "Wed May 03 16:58:35 2023 +0200"
  },
  "message": "Pass const frame_info_ptr reference for skip_[language_]trampoline\n\ng++ 13.1.1 produces a -Werror\u003ddangling-pointer\u003d\n\nIn file included from ../../binutils-gdb/gdb/frame.h:75,\n                 from ../../binutils-gdb/gdb/symtab.h:40,\n                 from ../../binutils-gdb/gdb/language.c:33:\nIn member function ‘void intrusive_list\u003cT, AsNode\u003e::push_empty(T\u0026) [with T \u003d frame_info_ptr; AsNode \u003d intrusive_base_node\u003cframe_info_ptr\u003e]’,\n    inlined from ‘void intrusive_list\u003cT, AsNode\u003e::push_back(reference) [with T \u003d frame_info_ptr; AsNode \u003d intrusive_base_node\u003cframe_info_ptr\u003e]’ at gdbsupport/intrusive_list.h:332:24,\n    inlined from ‘frame_info_ptr::frame_info_ptr(const frame_info_ptr\u0026)’ at gdb/frame.h:241:26,\n    inlined from ‘CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR)’ at gdb/language.c:530:49:\ngdbsupport/intrusive_list.h:415:12: error: storing the address of local variable ‘\u003canonymous\u003e’ in ‘frame_info_ptr::frame_list.intrusive_list\u003cframe_info_ptr\u003e::m_back’ [-Werror\u003ddangling-pointer\u003d]\n  415 |     m_back \u003d \u0026elem;\n      |     ~~~~~~~^~~~~~~\ngdb/language.c: In function ‘CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR)’:\ngdb/language.c:530:49: note: ‘\u003canonymous\u003e’ declared here\n  530 |       CORE_ADDR real_pc \u003d lang-\u003eskip_trampoline (frame, pc);\n      |                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~\ngdb/frame.h:359:41: note: ‘frame_info_ptr::frame_list’ declared here\n  359 |   static intrusive_list\u003cframe_info_ptr\u003e frame_list;\n      |                                         ^~~~~~~~~~\n\nEach new frame_info_ptr is being pushed on a static frame list and g++\ncannot see why that is safe in case the frame_info_ptr is created and\ndestroyed immediately when passed as value.\n\nIt isn\u0027t clear why only in this one place g++ sees the issue (probably\nbecause it can inline enough code in this specific case).\n\nSince passing the frame_info_ptr as const reference is cheaper, use\nthat as workaround for this warning.\n\nPR build/30413\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d30413\n\nTested-by: Kevin Buettner \u003ckevinb@redhat.com\u003e\nReviewed-by: Kevin Buettner \u003ckevinb@redhat.com\u003e\nReviewed-by: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6535ab93498dd5507139d2def40561b2e6eedbc8",
      "old_mode": 33188,
      "old_path": "gdb/c-lang.c",
      "new_id": "484f81e455b24e1aad64bd04a2b5221af55a2b5d",
      "new_mode": 33188,
      "new_path": "gdb/c-lang.c"
    },
    {
      "type": "modify",
      "old_id": "0b4202ff839073cdebbb7d279760bbf2644420ba",
      "old_mode": 33188,
      "old_path": "gdb/language.c",
      "new_id": "f82c5b173b3c0e658ab08715b40b0a375d984251",
      "new_mode": 33188,
      "new_path": "gdb/language.c"
    },
    {
      "type": "modify",
      "old_id": "4c91776d94dcba35559e64d04ba64c4bc96e8118",
      "old_mode": 33188,
      "old_path": "gdb/language.h",
      "new_id": "0ebd4c1d957ee959dc99b3bb756a584437909de9",
      "new_mode": 33188,
      "new_path": "gdb/language.h"
    },
    {
      "type": "modify",
      "old_id": "ccbe7c19729d2e747d7e95fd38a3f845f2df4d2e",
      "old_mode": 33188,
      "old_path": "gdb/objc-lang.c",
      "new_id": "6af25d9c988f00183f4532c07dc5e5cd0f202eba",
      "new_mode": 33188,
      "new_path": "gdb/objc-lang.c"
    }
  ]
}
