Hi zsm,
I have tired the above specified tool on one of the header file and it
showed below stack trace. Also the doc [1] says to specify device
type. But there is no such argument support from syz-headerparser.
Traceback (most recent call last):
File "headerparser.py", line 61, in <module>
main()
File "headerparser.py", line 51, in main
loglvl=loglvl, include_lines=include_lines)
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/container.py",
line 172, in __init__
self.load_header_files()
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/container.py",
line 205, in load_header_files
local_hierarchy = struct_walker.generate_local_hierarchy()
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/struct_walker.py",
line 249, in generate_local_hierarchy
self.visit(self.ast)
File "/usr/local/lib/python2.7/dist-packages/pycparser/c_ast.py",
line 120, in visit
return visitor(node)
File "/usr/local/lib/python2.7/dist-packages/pycparser/c_ast.py",
line 127, in generic_visit
self.visit(c)
File "/usr/local/lib/python2.7/dist-packages/pycparser/c_ast.py",
line 120, in visit
return visitor(node)
File "/usr/local/lib/python2.7/dist-packages/pycparser/c_ast.py",
line 127, in generic_visit
self.visit(c)
File "/usr/local/lib/python2.7/dist-packages/pycparser/c_ast.py",
line 120, in visit
return visitor(node)
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/struct_walker.py",
line 234, in visit_Struct
desc = self._traverse_ast(node)
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/struct_walker.py",
line 222, in _traverse_ast
item = self._recursive_process_item(child[1], {}, None)
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/struct_walker.py",
line 162, in _recursive_process_item
return self._recursive_process_item(item_ast.type, processed_item, item_ast)
File "/local/mnt/workspace2/syzkaller-02202017/src/
github.com/google/syzkaller/tools/syz-headerparser/headerlib/struct_walker.py",
line 197, in _recursive_process_item
processed_item['array_size'].append(int(item_ast.dim.value))
AttributeError: 'BinaryOp' object has no attribute 'value'
[1]
https://github.com/google/syzkaller/blob/master/docs/headerparser_usage.md
--
Thanks & Regards,
M.Srikanth Kumar.