[PATCH] D112075: Use safe yaml load_all

Yi Kong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 20 23:00:19 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1123e03a9d94: [opt-viewer] Use safe yaml load_all (authored by kongyi).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112075/new/

https://reviews.llvm.org/D112075

Files:
  llvm/tools/opt-viewer/optrecord.py


Index: llvm/tools/opt-viewer/optrecord.py
===================================================================
--- llvm/tools/opt-viewer/optrecord.py
+++ llvm/tools/opt-viewer/optrecord.py
@@ -274,7 +274,7 @@
     file_remarks = defaultdict(functools.partial(defaultdict, list))
 
     with io.open(input_file, encoding = 'utf-8') as f:
-        docs = yaml.load_all(f, Loader=Loader)
+        docs = yaml.safe_load_all(f, Loader=Loader)
 
         filter_e = None
         if filter_:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112075.381148.patch
Type: text/x-patch
Size: 485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211021/8f12f8b7/attachment.bin>


More information about the llvm-commits mailing list