bcoconni / ValgrindCI

A Python package that provides tools to integrate valgrind into your CI workflow
GNU General Public License v3.0
19 stars 8 forks source link

fails for valgrind 3.15 when trying to read "./stack[2]" #7

Closed Stadik closed 1 year ago

Stadik commented 1 year ago

ValgrindCI 0.2.0 fails under valgrind 3.15 and python 3.8 with error

Traceback (most recent call last):
  File "/usr/local/bin/valgrind-ci", line 23, in <module>
    main()
  File "/usr/local/lib/python3.8/dist-packages/ValgrindCI/__init__.py", line 54, in main
    data.parse(args.xml_file)
  File "/usr/local/lib/python3.8/dist-packages/ValgrindCI/parse.py", line 120, in parse
    self.errors.append(Error(error_tag))
  File "/usr/local/lib/python3.8/dist-packages/ValgrindCI/parse.py", line 50, in __init__
    for frame in tag.find("./stack[2]").findall("frame"):
AttributeError: 'NoneType' object has no attribute 'findall'

The fix is a simple if tag.find("./stack[2]") is not None:

attached the patch for the fix. (its a patch file but only txt can be uploaded) ValgrindCI.txt

bcoconni commented 1 year ago

Thanks for the bug report @Stadik :+1: Your patch has been applied to the master branch. Please check and let me know if that fixes the issue that you have reported.

Stadik commented 1 year ago

Sorry for the late reply, had to debug something on OpenSUSE and could use your nice module again, it is fixed with master!