[PATCH] D112075: Use safe yaml load_all
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 1 01:54:44 PDT 2021
shchenz added a comment.
In D112075#3099677 <https://reviews.llvm.org/D112075#3099677>, @kongyi wrote:
> In D112075#3099663 <https://reviews.llvm.org/D112075#3099663>, @shchenz wrote:
>
>> Hi @kongyi , this breaks opt-viewer.py usage on the AIX platform.
>>
>> opt-viewer/opt-viewer.py test.opt.yaml --demangler cat
>> For faster parsing, you may want to install libYAML for PyYAML
>> Reading YAML files...
>> 1 of 1multiprocessing.pool.RemoteTraceback:
>> """
>> Traceback (most recent call last):
>> File "/opt/freeware/lib64/python3.7/multiprocessing/pool.py", line 121, in worker
>> result = (True, func(*args, **kwds))
>> File "/opt/freeware/lib64/python3.7/multiprocessing/pool.py", line 44, in mapstar
>> return list(map(*args))
>> File "/home/czhengsz/llvm/dev/llvm-project/llvm/tools/opt-viewer/optpmap.py", line 25, in _wrapped_func
>> return func(argument, filter_)
>> File "/home/czhengsz/llvm/dev/llvm-project/llvm/tools/opt-viewer/optrecord.py", line 277, in get_remarks
>> docs = yaml.safe_load_all(f, Loader=Loader)
>> TypeError: safe_load_all() got an unexpected keyword argument 'Loader'
>> """
>
> Can you try removing the second argument (`Loader=Loader`) and check if it works?
No, still fails.
Traceback (most recent call last):
File "/opt/freeware/lib64/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/opt/freeware/lib64/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/czhengsz/llvm/dev/llvm-project/llvm/tools/opt-viewer/optpmap.py", line 25, in _wrapped_func
return func(argument, filter_)
File "/home/czhengsz/llvm/dev/llvm-project/llvm/tools/opt-viewer/optrecord.py", line 282, in get_remarks
for remark in docs:
File "/home/czhengsz/test/optviewer/optviewer_env/lib64/python3.7/site-packages/yaml/__init__.py", line 93, in load_all
yield loader.get_data()
File "/home/czhengsz/test/optviewer/optviewer_env/lib64/python3.7/site-packages/yaml/constructor.py", line 45, in get_data
return self.construct_document(self.get_node())
File "/home/czhengsz/test/optviewer/optviewer_env/lib64/python3.7/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
File "/home/czhengsz/test/optviewer/optviewer_env/lib64/python3.7/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
File "/home/czhengsz/test/optviewer/optviewer_env/lib64/python3.7/site-packages/yaml/constructor.py", line 429, in construct_undefined
node.start_mark)
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!Missed'
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112075/new/
https://reviews.llvm.org/D112075
More information about the llvm-commits
mailing list