[all-commits] [llvm/llvm-project] 925126: [llvm][mustache] Fix UB in ASTNode::render()

Paul Kirth via All-commits all-commits at lists.llvm.org
Fri May 30 20:06:57 PDT 2025


  Branch: refs/heads/users/ilovepi/mustache-fix-ub
  Home:   https://github.com/llvm/llvm-project
  Commit: 925126d93ffd0c6d992eb76609246a3767439367
      https://github.com/llvm/llvm-project/commit/925126d93ffd0c6d992eb76609246a3767439367
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2025-05-30 (Fri, 30 May 2025)

  Changed paths:
    M llvm/lib/Support/Mustache.cpp

  Log Message:
  -----------
  [llvm][mustache] Fix UB in ASTNode::render()

The current implementation set a reference to a nullptr, leading to all
kinds of problems. Instead, we can check the various uses to ensure we
don't deref invalid memory, and improve the logic for how contexts are
passed to children, since that was also subtly wrong in some cases.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list