)]}'
{
  "commit": "2adbf167cae8812417a38d834e6878540632e0b8",
  "tree": "f0cac51d1431c1e429c99b10c2b17f631b6d3fd9",
  "parents": [
    "ada5c6fa081410fa41df67013f3c1eb6d64e0680"
  ],
  "author": {
    "name": "Jens Remus",
    "email": "jremus@linux.ibm.com",
    "time": "Mon May 26 11:02:47 2025 -0700"
  },
  "committer": {
    "name": "Indu Bhagat",
    "email": "indu.bhagat@oracle.com",
    "time": "Mon May 26 11:02:47 2025 -0700"
  },
  "message": "libsframe: handle SFrame FRE start/end IP offsets as unsigned\n\nThe SFrame FRE start address (fre_start_addr) is defined as unsigned\n32-bit integer, as it is an offset from SFrame FDE function start\naddress (sfde_func_start_address) and functions only grow upwards\n(towards higher addresses).\n\nThe SFrame FRE start IP offset is a synonym to the SFrame FRE start\naddress.  The SFrame FRE end IP offset is either the value of the\nsubsequent FDE start address minus one, if that exists, or the FDE\nfunction size minus one otherwise.  Both should therefore be handled\nas unsigned 32-bit integer.\n\nIn libsframe the \"lookup PC\" (pc) and SFrame FDE function start address\n(sfde_func_start_address) are both signed integers, as they are actually\noffsets from the SFrame section.  The unsigned FDE start/end IP offsets\nmay therefore only be safely compared against the offset of the lookup\nPC from FDE function start address if the FDE function start address is\nlower or equal to the lookup PC, as this guarantees the offset to be\nalways positive:\n\nGiven:\n\n  lookup_pc \u003d pc - sframe_addr\n\n  sfde_func_start_address \u003d func_start_addr - sframe_addr\n\nIf the FDE function start address is lower or equal than the lookup PC,\nwhich both are signed offsets from SFrame section, then the function\nstart address is also lower or equal to the PC, which are both unsigned:\n\n  sfde_func_start_address \u003c\u003d lookup_pc\n  func_start_addr - sframe_addr \u003c\u003d pc - sframe_addr\n  func_start_addr \u003c\u003d pc\n\nWith that the offset of the lookup PC from FDE function start address\n(lookup_pc - sfde_func_start_address) must always be positive, if\nFDE function start address is lower or equal to the lookup PC:\n\n  lookup_pc - sfde_func_start_address\n  \u003d pc - sframe_addr - (func_start_addr - sframe_addr)\n  \u003d pc - func_start_addr\n\nlibsframe/\n\t* sframe.c (sframe_find_fre): Define and handle start_ip_offset\n\tand end_ip_offset as unsigned (same as FRE fre_start_addr).\n\t(sframe_fre_check_range_p): Likewise.  Define PC offset (from\n\tfunction start address) as unsigned.\n\nSigned-off-by: Jens Remus \u003cjremus@linux.ibm.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d03dd5fc5fed9ea5ec542a0fbb89b175e286b36e",
      "old_mode": 33188,
      "old_path": "libsframe/sframe.c",
      "new_id": "950a6846f042d0e520761f3f1f6e35d5cb0efd84",
      "new_mode": 33188,
      "new_path": "libsframe/sframe.c"
    }
  ]
}
