[all-commits] [llvm/llvm-project] 8bb827: Add test for iterating over MDNode operands when t...

Shubham Sandeep Rastogi via All-commits all-commits at lists.llvm.org
Tue Feb 6 12:27:33 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8bb827c0e67e51adba1252d23edc58197e025cf7
      https://github.com/llvm/llvm-project/commit/8bb827c0e67e51adba1252d23edc58197e025cf7
  Author: Shubham Sandeep Rastogi <srastogi22 at apple.com>
  Date:   2024-02-06 (Tue, 06 Feb 2024)

  Changed paths:
    A llvm/test/Verifier/verify-dwarf-no-operands.ll

  Log Message:
  -----------
  Add test for iterating over MDNode operands when they are empty (#80737)

With e8512786fedbfa6ddba70ceddc29d7122173ba5e the for loop that iterates
over MDNode operands was changed to a range-based for loop. This change
surfaces a bug where if the result of MD->operands() is an ArrayRef that
has a size of 0, then iterating over that ArrayRef leads to a
segmentation fault, due to accessing invalid addresses.
    
This was reverted with 6ce03ff3fef8fb6fa9afe8eb22c6d98bced26d48 but this
test should be added to test that codepath in the future.




More information about the All-commits mailing list