Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1252155 Details for
Bug 1423592
gcc-python-plugin: FTBFS in rawhide
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
build.log
<fdopen> (text/plain), 2.16 MB, created by
Fedora Release Engineering
on 2017-02-17 14:00:31 UTC
(
hide
)
Description:
build.log
Filename:
MIME Type:
Creator:
Fedora Release Engineering
Created:
2017-02-17 14:00:31 UTC
Size:
2.16 MB
patch
obsolete
>Mock Version: 1.3.3 >Mock Version: 1.3.3 >ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target ppc64 --nodeps /builddir/build/SPECS/gcc-python-plugin.spec'], gid=425printOutput=Falseshell=Falseenv={'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'LANG': 'en_US.UTF-8', 'TERM': 'vt100'}uid=1000logger=<mockbuild.trace_decorator.getLog object at 0x3fff85992390>chrootPath='/var/lib/mock/f26-build-7611036-694176/root'timeout=172800user='mockbuild') >Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target ppc64 --nodeps /builddir/build/SPECS/gcc-python-plugin.spec'] with env {'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'LANG': 'en_US.UTF-8', 'TERM': 'vt100'} and shell False >sh: python: command not found >Building target platforms: ppc64 >Building for target ppc64 >Wrote: /builddir/build/SRPMS/gcc-python-plugin-0.15-11.fc26.src.rpm >Child return code was: 0 >ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target ppc64 --nodeps /builddir/build/SPECS/gcc-python-plugin.spec'], gid=425private_network=TrueprintOutput=Falseshell=Falseenv={'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'LANG': 'en_US.UTF-8', 'TERM': 'vt100'}uid=1000logger=<mockbuild.trace_decorator.getLog object at 0x3fff85992390>chrootPath='/var/lib/mock/f26-build-7611036-694176/root'timeout=172800user='mockbuild') >Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target ppc64 --nodeps /builddir/build/SPECS/gcc-python-plugin.spec'] with env {'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'SHELL': '/bin/bash', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'LANG': 'en_US.UTF-8', 'TERM': 'vt100'} and shell False >Building target platforms: ppc64 >Building for target ppc64 >Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.bUdMuI >+ umask 022 >+ cd /builddir/build/BUILD >+ cd /builddir/build/BUILD >+ rm -rf gcc-python-plugin-0.15 >+ /usr/bin/gzip -dc /builddir/build/SOURCES/gcc-python-plugin-0.15.tar.gz >+ /usr/bin/tar -xof - >+ STATUS=0 >+ '[' 0 -ne 0 ']' >+ cd gcc-python-plugin-0.15 >+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . >+ echo 'Patch #2 (arm-fixes.patch):' >Patch #2 (arm-fixes.patch): >+ /usr/bin/patch --no-backup-if-mismatch -p1 -b --suffix .arm-fixes.patch --fuzz=0 >patching file run-test-suite.py >Patch #3 (ppc-fixes.patch): >+ echo 'Patch #3 (ppc-fixes.patch):' >+ /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0 >patching file run-test-suite.py >+ PrepPlugin python2 >+ PluginName=python2 >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2 >+ rm -rf ../gcc-python-plugin-0.15-building-for-python2 >+ cp -a . ../gcc-python-plugin-0.15-building-for-python2 >+ PrepPlugin python2_debug >+ PluginName=python2_debug >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2_debug >+ rm -rf ../gcc-python-plugin-0.15-building-for-python2_debug >+ cp -a . ../gcc-python-plugin-0.15-building-for-python2_debug >+ PrepPlugin python3 >+ PluginName=python3 >+ BuildDir=../gcc-python-plugin-0.15-building-for-python3 >+ rm -rf ../gcc-python-plugin-0.15-building-for-python3 >+ cp -a . ../gcc-python-plugin-0.15-building-for-python3 >+ PrepPlugin python3_debug >+ PluginName=python3_debug >+ BuildDir=../gcc-python-plugin-0.15-building-for-python3_debug >+ rm -rf ../gcc-python-plugin-0.15-building-for-python3_debug >+ cp -a . ../gcc-python-plugin-0.15-building-for-python3_debug >Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.a00Gql >+ exit 0 >+ umask 022 >+ cd /builddir/build/BUILD >gcc_vr: 7.0.1-0.6.fc26 >+ cd gcc-python-plugin-0.15 >+ echo 'gcc_vr: 7.0.1-0.6.fc26' >+ BuildPlugin python python-config python2.so python2 >+ PythonExe=python >+ PythonConfig=python-config >+ PluginDso=python2.so >+ PluginName=python2 >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2 >+ pushd ../gcc-python-plugin-0.15-building-for-python2 >+ make -j4 PLUGIN_NAME=python2 PLUGIN_DSO=python2.so PYTHON=python PYTHON_CONFIG=python-config PLUGIN_PYTHONPATH=/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2 plugin print-gcc-version >~/build/BUILD/gcc-python-plugin-0.15-building-for-python2 ~/build/BUILD/gcc-python-plugin-0.15 >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >python generate-config-h.py -o autogenerated-config.h --gcc="cc" --plugindir="/usr/lib/gcc/ppc64-redhat-linux/7/plugin" >cd gcc-c-api && make libgcc-c-api.so CC=cc >make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gcc-c-api' >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -x c-header gimple-types.txt.in -o autogenerated-gimple-types.txt >python xml-to-h.py >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -x c-header tree-types.txt.in -o autogenerated-tree-types.txt >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -x c-header rtl-types.txt.in -o autogenerated-rtl-types.txt >Checking whether cc was built with C or C++... C++ >checking for gcc-plugin.h... found >checking whether plugin.def defines PLUGIN_FINISH_DECL... yes >checking whether passes are C++ classes... yes >writing autogenerated-config.h >writing autogenerated-EXTRA_CFLAGS.txt >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -x c++ -fno-rtti \ > -o print-gcc-version \ > print-gcc-version.c >python generate-callgraph-c.py > autogenerated-callgraph.c >python generate-casts-c.py autogenerated-casts.c autogenerated-casts.h >python generate-cfg-c.py > autogenerated-cfg.c >python generate-option-c.py > autogenerated-option.c >python generate-function-c.py > autogenerated-function.c >python generate-gimple-c.py > autogenerated-gimple.c >python generate-location-c.py > autogenerated-location.c >python generate-parameter-c.py > autogenerated-parameter.c >python generate-pass-c.py > autogenerated-pass.c >python generate-pretty-printer-c.py > autogenerated-pretty-printer.c >python generate-rtl-c.py > autogenerated-rtl.c >python generate-tree-c.py > autogenerated-tree.c >python generate-variable-c.py > autogenerated-variable.c >make: 'print-gcc-version' is up to date. >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-cfg.o gcc-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-constant.o gcc-constant.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-declaration.o gcc-declaration.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-diagnostics.o gcc-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-function.o gcc-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-gimple.o gcc-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-location.o gcc-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-option.o gcc-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-rtl.o gcc-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-tree.o gcc-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-type.o gcc-type.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-variable.o gcc-variable.c >python generate-casts-c.py autogenerated-casts.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -shared gcc-callgraph.o gcc-cfg.o gcc-constant.o gcc-declaration.o gcc-diagnostics.o gcc-function.o gcc-gimple.o gcc-location.o gcc-option.o gcc-rtl.o gcc-tree.o gcc-type.o gcc-variable.o autogenerated-casts.o -o libgcc-c-api.so >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gcc-c-api' >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python.o gcc-python.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-attribute.o gcc-python-attribute.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-callbacks.o gcc-python-callbacks.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-callgraph.o gcc-python-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-cfg.o gcc-python-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-closure.o gcc-python-closure.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-diagnostics.o gcc-python-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-function.o gcc-python-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-gimple.o gcc-python-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-location.o gcc-python-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-option.o gcc-python-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-parameter.o gcc-python-parameter.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-pass.o gcc-python-pass.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-pretty-printer.o gcc-python-pretty-printer.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-rtl.o gcc-python-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-tree.o gcc-python-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-variable.o gcc-python-variable.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-version.o gcc-python-version.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o gcc-python-wrapper.o gcc-python-wrapper.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-callgraph.o autogenerated-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-cfg.o autogenerated-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-option.o autogenerated-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-function.o autogenerated-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-gimple.o autogenerated-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-location.o autogenerated-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-parameter.o autogenerated-parameter.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-pass.o autogenerated-pass.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-pretty-printer.o autogenerated-pretty-printer.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-rtl.o autogenerated-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-tree.o autogenerated-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -c -x c++ -fno-rtti -o autogenerated-variable.o autogenerated-variable.c >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7 -I/usr/include/python2.7 -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -shared \ > gcc-python.o gcc-python-attribute.o gcc-python-callbacks.o gcc-python-callgraph.o gcc-python-cfg.o gcc-python-closure.o gcc-python-diagnostics.o gcc-python-function.o gcc-python-gimple.o gcc-python-location.o gcc-python-option.o gcc-python-parameter.o gcc-python-pass.o gcc-python-pretty-printer.o gcc-python-rtl.o gcc-python-tree.o gcc-python-variable.o gcc-python-version.o gcc-python-wrapper.o autogenerated-callgraph.o autogenerated-casts.o autogenerated-cfg.o autogenerated-option.o autogenerated-function.o autogenerated-gimple.o autogenerated-location.o autogenerated-parameter.o autogenerated-pass.o autogenerated-pretty-printer.o autogenerated-rtl.o autogenerated-tree.o autogenerated-variable.o \ > -o python2.so \ > -lpython2.7 -lpthread -ldl -lutil -lm \ > -lgcc-c-api -Lgcc-c-api -Wl,-rpath=/usr/lib/gcc/ppc64-redhat-linux/7/plugin >+ popd >~/build/BUILD/gcc-python-plugin-0.15 >+ BuildPlugin python-debug python-debug-config python2_debug.so python2_debug >+ PythonExe=python-debug >+ PythonConfig=python-debug-config >+ PluginDso=python2_debug.so >+ PluginName=python2_debug >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2_debug >+ pushd ../gcc-python-plugin-0.15-building-for-python2_debug >~/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug ~/build/BUILD/gcc-python-plugin-0.15 >+ make -j4 PLUGIN_NAME=python2_debug PLUGIN_DSO=python2_debug.so PYTHON=python-debug PYTHON_CONFIG=python-debug-config PLUGIN_PYTHONPATH=/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug plugin print-gcc-version >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >python-debug generate-config-h.py -o autogenerated-config.h --gcc="cc" --plugindir="/usr/lib/gcc/ppc64-redhat-linux/7/plugin" >cd gcc-c-api && make libgcc-c-api.so CC=cc >make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/gcc-c-api' >python-debug xml-to-h.py >[23579 refs] >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -x c-header gimple-types.txt.in -o autogenerated-gimple-types.txt >[23579 refs] >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -x c-header tree-types.txt.in -o autogenerated-tree-types.txt >[23579 refs] >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -x c-header rtl-types.txt.in -o autogenerated-rtl-types.txt >Checking whether cc was built with C or C++... C++ >checking for gcc-plugin.h... found >checking whether plugin.def defines PLUGIN_FINISH_DECL... yes >checking whether passes are C++ classes... yes >writing autogenerated-config.h >writing autogenerated-EXTRA_CFLAGS.txt >[33527 refs] >[23579 refs] >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -x c++ -fno-rtti \ > -o print-gcc-version \ > print-gcc-version.c >python-debug generate-callgraph-c.py > autogenerated-callgraph.c >python-debug generate-casts-c.py autogenerated-casts.c autogenerated-casts.h >python-debug generate-cfg-c.py > autogenerated-cfg.c >[27018 refs] >python-debug generate-option-c.py > autogenerated-option.c >[27012 refs] >python-debug generate-function-c.py > autogenerated-function.c >[27012 refs] >python-debug generate-gimple-c.py > autogenerated-gimple.c >[27012 refs] >python-debug generate-location-c.py > autogenerated-location.c >[28153 refs] >python-debug generate-parameter-c.py > autogenerated-parameter.c >[27012 refs] >python-debug generate-pass-c.py > autogenerated-pass.c >[27012 refs] >python-debug generate-pretty-printer-c.py > autogenerated-pretty-printer.c >[27012 refs] >python-debug generate-rtl-c.py > autogenerated-rtl.c >[27012 refs] >python-debug generate-tree-c.py > autogenerated-tree.c >[46758 refs] >python-debug generate-variable-c.py > autogenerated-variable.c >make: 'print-gcc-version' is up to date. >[27012 refs] >[46754 refs] >[35018 refs] >[39832 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-cfg.o gcc-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-constant.o gcc-constant.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-declaration.o gcc-declaration.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-diagnostics.o gcc-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-function.o gcc-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-gimple.o gcc-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-location.o gcc-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-option.o gcc-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-rtl.o gcc-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-tree.o gcc-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-type.o gcc-type.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-variable.o gcc-variable.c >python-debug generate-casts-c.py autogenerated-casts.c >[35018 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -shared gcc-callgraph.o gcc-cfg.o gcc-constant.o gcc-declaration.o gcc-diagnostics.o gcc-function.o gcc-gimple.o gcc-location.o gcc-option.o gcc-rtl.o gcc-tree.o gcc-type.o gcc-variable.o autogenerated-casts.o -o libgcc-c-api.so >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/gcc-c-api' >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python.o gcc-python.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-attribute.o gcc-python-attribute.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-callbacks.o gcc-python-callbacks.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-callgraph.o gcc-python-callgraph.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-cfg.o gcc-python-cfg.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-closure.o gcc-python-closure.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-diagnostics.o gcc-python-diagnostics.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-function.o gcc-python-function.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-gimple.o gcc-python-gimple.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-location.o gcc-python-location.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-option.o gcc-python-option.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-parameter.o gcc-python-parameter.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-pass.o gcc-python-pass.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-pretty-printer.o gcc-python-pretty-printer.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-rtl.o gcc-python-rtl.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-tree.o gcc-python-tree.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-variable.o gcc-python-variable.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-version.o gcc-python-version.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o gcc-python-wrapper.o gcc-python-wrapper.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-callgraph.o autogenerated-callgraph.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-cfg.o autogenerated-cfg.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-option.o autogenerated-option.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-function.o autogenerated-function.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-gimple.o autogenerated-gimple.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-location.o autogenerated-location.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-parameter.o autogenerated-parameter.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-pass.o autogenerated-pass.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-pretty-printer.o autogenerated-pretty-printer.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-rtl.o autogenerated-rtl.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-tree.o autogenerated-tree.c >[23579 refs] >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -c -x c++ -fno-rtti -o autogenerated-variable.o autogenerated-variable.c >[23579 refs] >[23579 refs] >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python2.7-debug -I/usr/include/python2.7-debug -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -shared \ > gcc-python.o gcc-python-attribute.o gcc-python-callbacks.o gcc-python-callgraph.o gcc-python-cfg.o gcc-python-closure.o gcc-python-diagnostics.o gcc-python-function.o gcc-python-gimple.o gcc-python-location.o gcc-python-option.o gcc-python-parameter.o gcc-python-pass.o gcc-python-pretty-printer.o gcc-python-rtl.o gcc-python-tree.o gcc-python-variable.o gcc-python-version.o gcc-python-wrapper.o autogenerated-callgraph.o autogenerated-casts.o autogenerated-cfg.o autogenerated-option.o autogenerated-function.o autogenerated-gimple.o autogenerated-location.o autogenerated-parameter.o autogenerated-pass.o autogenerated-pretty-printer.o autogenerated-rtl.o autogenerated-tree.o autogenerated-variable.o \ > -o python2_debug.so \ > -lpython2.7_d -lpthread -ldl -lutil -lm \ > -lgcc-c-api -Lgcc-c-api -Wl,-rpath=/usr/lib/gcc/ppc64-redhat-linux/7/plugin >+ popd >~/build/BUILD/gcc-python-plugin-0.15 >~/build/BUILD/gcc-python-plugin-0.15-building-for-python3 ~/build/BUILD/gcc-python-plugin-0.15 >+ BuildPlugin python3 python3-config python3.so python3 >+ PythonExe=python3 >+ PythonConfig=python3-config >+ PluginDso=python3.so >+ PluginName=python3 >+ BuildDir=../gcc-python-plugin-0.15-building-for-python3 >+ pushd ../gcc-python-plugin-0.15-building-for-python3 >+ make -j4 PLUGIN_NAME=python3 PLUGIN_DSO=python3.so PYTHON=python3 PYTHON_CONFIG=python3-config PLUGIN_PYTHONPATH=/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3 plugin print-gcc-version >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >python3 generate-config-h.py -o autogenerated-config.h --gcc="cc" --plugindir="/usr/lib/gcc/ppc64-redhat-linux/7/plugin" >cd gcc-c-api && make libgcc-c-api.so CC=cc >make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/gcc-c-api' >python3 xml-to-h.py >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -x c-header gimple-types.txt.in -o autogenerated-gimple-types.txt >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -x c-header tree-types.txt.in -o autogenerated-tree-types.txt >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -x c-header rtl-types.txt.in -o autogenerated-rtl-types.txt >Checking whether cc was built with C or C++... C++ >checking for gcc-plugin.h... found >checking whether plugin.def defines PLUGIN_FINISH_DECL... yes >checking whether passes are C++ classes... yes >writing autogenerated-config.h >writing autogenerated-EXTRA_CFLAGS.txt >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -x c++ -fno-rtti \ > -o print-gcc-version \ > print-gcc-version.c >python3 generate-callgraph-c.py > autogenerated-callgraph.c >python3 generate-casts-c.py autogenerated-casts.c autogenerated-casts.h >python3 generate-cfg-c.py > autogenerated-cfg.c >python3 generate-option-c.py > autogenerated-option.c >python3 generate-function-c.py > autogenerated-function.c >python3 generate-gimple-c.py > autogenerated-gimple.c >python3 generate-location-c.py > autogenerated-location.c >python3 generate-parameter-c.py > autogenerated-parameter.c >python3 generate-pass-c.py > autogenerated-pass.c >python3 generate-pretty-printer-c.py > autogenerated-pretty-printer.c >python3 generate-rtl-c.py > autogenerated-rtl.c >python3 generate-tree-c.py > autogenerated-tree.c >python3 generate-variable-c.py > autogenerated-variable.c >make: 'print-gcc-version' is up to date. >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-cfg.o gcc-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-constant.o gcc-constant.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-declaration.o gcc-declaration.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-diagnostics.o gcc-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-function.o gcc-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-gimple.o gcc-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-location.o gcc-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-option.o gcc-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-rtl.o gcc-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-tree.o gcc-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-type.o gcc-type.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-variable.o gcc-variable.c >python3 generate-casts-c.py autogenerated-casts.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -shared gcc-callgraph.o gcc-cfg.o gcc-constant.o gcc-declaration.o gcc-diagnostics.o gcc-function.o gcc-gimple.o gcc-location.o gcc-option.o gcc-rtl.o gcc-tree.o gcc-type.o gcc-variable.o autogenerated-casts.o -o libgcc-c-api.so >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/gcc-c-api' >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python.o gcc-python.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-attribute.o gcc-python-attribute.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-callbacks.o gcc-python-callbacks.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-callgraph.o gcc-python-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-cfg.o gcc-python-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-closure.o gcc-python-closure.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-diagnostics.o gcc-python-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-function.o gcc-python-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-gimple.o gcc-python-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-location.o gcc-python-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-option.o gcc-python-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-parameter.o gcc-python-parameter.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-pass.o gcc-python-pass.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-pretty-printer.o gcc-python-pretty-printer.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-rtl.o gcc-python-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-tree.o gcc-python-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-variable.o gcc-python-variable.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-version.o gcc-python-version.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o gcc-python-wrapper.o gcc-python-wrapper.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-callgraph.o autogenerated-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-cfg.o autogenerated-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-option.o autogenerated-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-function.o autogenerated-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-gimple.o autogenerated-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-location.o autogenerated-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-parameter.o autogenerated-parameter.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-pass.o autogenerated-pass.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-pretty-printer.o autogenerated-pretty-printer.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-rtl.o autogenerated-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-tree.o autogenerated-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -c -x c++ -fno-rtti -o autogenerated-variable.o autogenerated-variable.c >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6m -I/usr/include/python3.6m -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -shared \ > gcc-python.o gcc-python-attribute.o gcc-python-callbacks.o gcc-python-callgraph.o gcc-python-cfg.o gcc-python-closure.o gcc-python-diagnostics.o gcc-python-function.o gcc-python-gimple.o gcc-python-location.o gcc-python-option.o gcc-python-parameter.o gcc-python-pass.o gcc-python-pretty-printer.o gcc-python-rtl.o gcc-python-tree.o gcc-python-variable.o gcc-python-version.o gcc-python-wrapper.o autogenerated-callgraph.o autogenerated-casts.o autogenerated-cfg.o autogenerated-option.o autogenerated-function.o autogenerated-gimple.o autogenerated-location.o autogenerated-parameter.o autogenerated-pass.o autogenerated-pretty-printer.o autogenerated-rtl.o autogenerated-tree.o autogenerated-variable.o \ > -o python3.so \ > -lpython3.6m -lpthread -ldl -lutil -lm \ > -lgcc-c-api -Lgcc-c-api -Wl,-rpath=/usr/lib/gcc/ppc64-redhat-linux/7/plugin >+ popd >~/build/BUILD/gcc-python-plugin-0.15 >~/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug ~/build/BUILD/gcc-python-plugin-0.15 >+ BuildPlugin python3-debug python3.6dm-config python3_debug.so python3_debug >+ PythonExe=python3-debug >+ PythonConfig=python3.6dm-config >+ PluginDso=python3_debug.so >+ PluginName=python3_debug >+ BuildDir=../gcc-python-plugin-0.15-building-for-python3_debug >+ pushd ../gcc-python-plugin-0.15-building-for-python3_debug >+ make -j4 PLUGIN_NAME=python3_debug PLUGIN_DSO=python3_debug.so PYTHON=python3-debug PYTHON_CONFIG=python3.6dm-config PLUGIN_PYTHONPATH=/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug plugin print-gcc-version >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >python3-debug generate-config-h.py -o autogenerated-config.h --gcc="cc" --plugindir="/usr/lib/gcc/ppc64-redhat-linux/7/plugin" >cd gcc-c-api && make libgcc-c-api.so CC=cc >make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/gcc-c-api' >python3-debug xml-to-h.py >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -x c-header gimple-types.txt.in -o autogenerated-gimple-types.txt >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -x c-header tree-types.txt.in -o autogenerated-tree-types.txt >cc -E -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -x c-header rtl-types.txt.in -o autogenerated-rtl-types.txt >Checking whether cc was built with C or C++... C++ >checking for gcc-plugin.h... found >checking whether plugin.def defines PLUGIN_FINISH_DECL... yes >checking whether passes are C++ classes... yes >writing autogenerated-config.h >writing autogenerated-EXTRA_CFLAGS.txt >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -x c++ -fno-rtti \ > -o print-gcc-version \ > print-gcc-version.c >python3-debug generate-callgraph-c.py > autogenerated-callgraph.c >python3-debug generate-casts-c.py autogenerated-casts.c autogenerated-casts.h >python3-debug generate-cfg-c.py > autogenerated-cfg.c >python3-debug generate-option-c.py > autogenerated-option.c >python3-debug generate-function-c.py > autogenerated-function.c >python3-debug generate-gimple-c.py > autogenerated-gimple.c >python3-debug generate-location-c.py > autogenerated-location.c >python3-debug generate-parameter-c.py > autogenerated-parameter.c >python3-debug generate-pass-c.py > autogenerated-pass.c >python3-debug generate-pretty-printer-c.py > autogenerated-pretty-printer.c >python3-debug generate-rtl-c.py > autogenerated-rtl.c >python3-debug generate-tree-c.py > autogenerated-tree.c >python3-debug generate-variable-c.py > autogenerated-variable.c >make: 'print-gcc-version' is up to date. >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-callgraph.o gcc-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-cfg.o gcc-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-constant.o gcc-constant.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-declaration.o gcc-declaration.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-diagnostics.o gcc-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-function.o gcc-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-gimple.o gcc-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-location.o gcc-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-option.o gcc-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-rtl.o gcc-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-tree.o gcc-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-type.o gcc-type.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o gcc-variable.o gcc-variable.c >python3-debug generate-casts-c.py autogenerated-casts.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -shared gcc-callgraph.o gcc-cfg.o gcc-constant.o gcc-declaration.o gcc-diagnostics.o gcc-function.o gcc-gimple.o gcc-location.o gcc-option.o gcc-rtl.o gcc-tree.o gcc-type.o gcc-variable.o autogenerated-casts.o -o libgcc-c-api.so >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/gcc-c-api' >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python.o gcc-python.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-attribute.o gcc-python-attribute.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-callbacks.o gcc-python-callbacks.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-callgraph.o gcc-python-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-cfg.o gcc-python-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-closure.o gcc-python-closure.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-diagnostics.o gcc-python-diagnostics.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-function.o gcc-python-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-gimple.o gcc-python-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-location.o gcc-python-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-option.o gcc-python-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-parameter.o gcc-python-parameter.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-pass.o gcc-python-pass.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-pretty-printer.o gcc-python-pretty-printer.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-rtl.o gcc-python-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-tree.o gcc-python-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-variable.o gcc-python-variable.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-version.o gcc-python-version.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o gcc-python-wrapper.o gcc-python-wrapper.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-callgraph.o autogenerated-callgraph.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-casts.o autogenerated-casts.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-cfg.o autogenerated-cfg.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-option.o autogenerated-option.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-function.o autogenerated-function.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-gimple.o autogenerated-gimple.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-location.o autogenerated-location.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-parameter.o autogenerated-parameter.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-pass.o autogenerated-pass.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-pretty-printer.o autogenerated-pretty-printer.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-rtl.o autogenerated-rtl.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-tree.o autogenerated-tree.c >cc -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -c -x c++ -fno-rtti -o autogenerated-variable.o autogenerated-variable.c >cc \ > -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include -I/usr/lib/gcc/ppc64-redhat-linux/7/plugin/include/c-family -I. -I/usr/include/python3.6dm -I/usr/include/python3.6dm -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug"' -O2 -Werror -g -fPIC -fno-strict-aliasing -Wall \ > -shared \ > gcc-python.o gcc-python-attribute.o gcc-python-callbacks.o gcc-python-callgraph.o gcc-python-cfg.o gcc-python-closure.o gcc-python-diagnostics.o gcc-python-function.o gcc-python-gimple.o gcc-python-location.o gcc-python-option.o gcc-python-parameter.o gcc-python-pass.o gcc-python-pretty-printer.o gcc-python-rtl.o gcc-python-tree.o gcc-python-variable.o gcc-python-version.o gcc-python-wrapper.o autogenerated-callgraph.o autogenerated-casts.o autogenerated-cfg.o autogenerated-option.o autogenerated-function.o autogenerated-gimple.o autogenerated-location.o autogenerated-parameter.o autogenerated-pass.o autogenerated-pretty-printer.o autogenerated-rtl.o autogenerated-tree.o autogenerated-variable.o \ > -o python3_debug.so \ > -lpython3.6dm -lpthread -ldl -lutil -lm \ > -lgcc-c-api -Lgcc-c-api -Wl,-rpath=/usr/lib/gcc/ppc64-redhat-linux/7/plugin >+ popd >~/build/BUILD/gcc-python-plugin-0.15 >+ cd docs >+ make html >sphinx-build -b html -d _build/doctrees . _build/html >Running Sphinx v1.5.1 >making output directory... >loading pickled environment... not yet created >building [mo]: targets for 0 po files that are out of date >building [html]: targets for 36 source files that are out of date >updating environment: 36 added, 0 changed, 0 removed >reading sources... [ 2%] 0.10 >reading sources... [ 5%] 0.11 >reading sources... [ 8%] 0.12 >reading sources... [ 11%] 0.13 >reading sources... [ 13%] 0.14 >reading sources... [ 16%] 0.15 >reading sources... [ 19%] 0.7 >reading sources... [ 22%] 0.8 >reading sources... [ 25%] 0.9 >reading sources... [ 27%] appendices >reading sources... [ 30%] attributes >reading sources... [ 33%] basics >reading sources... [ 36%] callbacks >reading sources... [ 38%] callgraph >reading sources... [ 41%] cfg >reading sources... [ 44%] cpychecker >reading sources... [ 47%] examples >reading sources... [ 50%] gcc-overview >reading sources... [ 52%] gcc-with-python >reading sources... [ 55%] getting-involved >reading sources... [ 58%] gimple >reading sources... [ 61%] index >reading sources... [ 63%] lto >reading sources... [ 66%] misc >reading sources... [ 69%] operators >reading sources... [ 72%] options >reading sources... [ 75%] parameters >reading sources... [ 77%] passes >reading sources... [ 80%] preprocessor >reading sources... [ 83%] release-notes >reading sources... [ 86%] rtl >reading sources... [ 88%] success >reading sources... [ 91%] tables-of-passes >reading sources... [ 94%] tree >reading sources... [ 97%] versions >reading sources... [100%] working-with-c >looking for now-outdated files... none found >pickling environment... done >checking consistency... done >preparing documents... /builddir/build/BUILD/gcc-python-plugin-0.15/docs/gcc-with-python.rst:: WARNING: document isn't included in any toctree >done >writing output... [ 2%] 0.10 >writing output... [ 5%] 0.11 >writing output... [ 8%] 0.12 >writing output... [ 11%] 0.13 >writing output... [ 13%] 0.14 >writing output... [ 16%] 0.15 >writing output... [ 19%] 0.7 >writing output... [ 22%] 0.8 >writing output... [ 25%] 0.9 >writing output... [ 27%] appendices >writing output... [ 30%] attributes >writing output... [ 33%] basics >writing output... [ 36%] callbacks >writing output... [ 38%] callgraph >writing output... [ 41%] cfg >writing output... [ 44%] cpychecker >writing output... [ 47%] examples >writing output... [ 50%] gcc-overview >writing output... [ 52%] gcc-with-python >writing output... [ 55%] getting-involved >writing output... [ 58%] gimple >writing output... [ 61%] index >writing output... [ 63%] lto >writing output... [ 66%] misc >writing output... [ 69%] operators >writing output... [ 72%] options >writing output... [ 75%] parameters >writing output... [ 77%] passes >writing output... [ 80%] preprocessor >writing output... [ 83%] release-notes >writing output... [ 86%] rtl >writing output... [ 88%] success >writing output... [ 91%] tables-of-passes >writing output... [ 94%] tree >writing output... [ 97%] versions >writing output... [100%] working-with-c >generating indices... genindex >writing additional pages... search >copying images... [ 14%] sample-callgraph.png >copying images... [ 28%] sample-html-error-report.png >copying images... [ 42%] sample-gimple-cfg.png >copying images... [ 57%] sample-supergraph.png >copying images... [ 71%] new-html-error-report.png >copying images... [ 85%] passes.svg >copying images... [100%] sample-gimple-ssa-cfg.png >copying static files... done >copying extra files... done >WARNING: html_static_path entry u'/builddir/build/BUILD/gcc-python-plugin-0.15/docs/_static' does not exist >dumping search index in English (code: en) ... done >dumping object inventory... done >build succeeded, 2 warnings. >Build finished. The HTML pages are in _build/html. >+ rm _build/html/.buildinfo >+ make man >sphinx-build -b man -d _build/doctrees . _build/man >Running Sphinx v1.5.1 >making output directory... >loading pickled environment... done >building [mo]: targets for 0 po files that are out of date >building [man]: all manpages >updating environment: 0 added, 0 changed, 0 removed >looking for now-outdated files... none found >writing... gcc-python-plugin.1 { basics gcc-overview examples working-with-c cfg tree gimple passes callbacks attributes cpychecker success getting-involved misc callgraph lto options parameters preprocessor versions rtl release-notes 0.15 0.14 0.13 0.12 0.11 0.10 0.9 0.8 0.7 appendices tables-of-passes operators } gcc-with-python.1 { } >build succeeded. >Build finished. The manual pages are in _build/man. >+ exit 0 >Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.DBB98l >+ umask 022 >+ cd /builddir/build/BUILD >+ '[' /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 '!=' / ']' >+ rm -rf /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 >++ dirname /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 >+ mkdir -p /builddir/build/BUILDROOT >+ mkdir /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 >+ cd gcc-python-plugin-0.15 >+ rm -rf /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 >+ mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/lib/gcc/ppc64-redhat-linux/7/plugin >+ mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/bin >+ mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/share/man/man1 >~/build/BUILD/gcc-python-plugin-0.15-building-for-python2 ~/build/BUILD/gcc-python-plugin-0.15 >+ InstallPlugin python python-config python2.so python2 >+ PythonExe=python >+ PythonConfig=python-config >+ PluginDso=python2.so >+ PluginName=python2 >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2 >+ pushd ../gcc-python-plugin-0.15-building-for-python2 >+ make install DESTDIR=/builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 PLUGIN_NAME=python2 PLUGIN_DSO=python2.so >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >cd docs && make man >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/docs' >sphinx-build -b man -d _build/doctrees . _build/man >Running Sphinx v1.5.1 >making output directory... >loading pickled environment... not yet created >building [mo]: targets for 0 po files that are out of date >building [man]: all manpages >updating environment: 36 added, 0 changed, 0 removed >reading sources... [ 2%] 0.10 >reading sources... [ 5%] 0.11 >reading sources... [ 8%] 0.12 >reading sources... [ 11%] 0.13 >reading sources... [ 13%] 0.14 >reading sources... [ 16%] 0.15 >reading sources... [ 19%] 0.7 >reading sources... [ 22%] 0.8 >reading sources... [ 25%] 0.9 >reading sources... [ 27%] appendices >reading sources... [ 30%] attributes >reading sources... [ 33%] basics >reading sources... [ 36%] callbacks >reading sources... [ 38%] callgraph >reading sources... [ 41%] cfg >reading sources... [ 44%] cpychecker >reading sources... [ 47%] examples >reading sources... [ 50%] gcc-overview >reading sources... [ 52%] gcc-with-python >reading sources... [ 55%] getting-involved >reading sources... [ 58%] gimple >reading sources... [ 61%] index >reading sources... [ 63%] lto >reading sources... [ 66%] misc >reading sources... [ 69%] operators >reading sources... [ 72%] options >reading sources... [ 75%] parameters >reading sources... [ 77%] passes >reading sources... [ 80%] preprocessor >reading sources... [ 83%] release-notes >reading sources... [ 86%] rtl >reading sources... [ 88%] success >reading sources... [ 91%] tables-of-passes >reading sources... [ 94%] tree >reading sources... [ 97%] versions >reading sources... [100%] working-with-c >looking for now-outdated files... none found >pickling environment... done >checking consistency... done >/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/docs/gcc-with-python.rst:: WARNING: document isn't included in any toctree >writing... gcc-python-plugin.1 { basics gcc-overview examples working-with-c cfg tree gimple passes callbacks attributes cpychecker success getting-involved misc callgraph lto options parameters preprocessor versions rtl release-notes 0.15 0.14 0.13 0.12 0.11 0.10 0.9 0.8 0.7 appendices tables-of-passes operators } gcc-with-python.1 { } >build succeeded, 1 warning. >Build finished. The manual pages are in _build/man. >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/docs' ># Fixup the generic manpage for this build: >cp docs/_build/man/gcc-with-python.1 gcc-with-python2.1 >sed \ > -i \ > -e"s|gcc-with-python|gcc-with-python2|g" \ > gcc-with-python2.1 >sed \ > -i \ > -e"s|GCC-WITH-PYTHON|GCC-WITH-PYTHON2|g" \ > gcc-with-python2.1 >rm -f gcc-with-python2.1.gz >gzip gcc-with-python2.1 >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cd gcc-c-api && make install >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gcc-c-api' >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cp libgcc-c-api.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gcc-c-api' >cp python2.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2 >cp -a gccutils /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2 >cp -a libcpychecker /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2 ># Create "gcc-with-" support script: >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin >install -m 755 gcc-with-python /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/bin/gcc-with-python2 ># Fixup the reference to the plugin in that script, from being expressed as ># a DSO filename with a path (for a working copy) to a name of an installed ># plugin within GCC's search directory: >sed \ > -i \ > -e"s|-fplugin=[^ ]*|-fplugin=python2|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python2 ># name for this specific build: >sed \ > -i \ > -e"s|-fplugin-arg-python-script|-fplugin-arg-python2-script|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python2 >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >cp gcc-with-python2.1.gz /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >~/build/BUILD/gcc-python-plugin-0.15 >~/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug ~/build/BUILD/gcc-python-plugin-0.15 >+ popd >+ InstallPlugin python-debug python-debug-config python2_debug.so python2_debug >+ PythonExe=python-debug >+ PythonConfig=python-debug-config >+ PluginDso=python2_debug.so >+ PluginName=python2_debug >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2_debug >+ pushd ../gcc-python-plugin-0.15-building-for-python2_debug >+ make install DESTDIR=/builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 PLUGIN_NAME=python2_debug PLUGIN_DSO=python2_debug.so >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >cd docs && make man >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/docs' >sphinx-build -b man -d _build/doctrees . _build/man >Running Sphinx v1.5.1 >making output directory... >loading pickled environment... not yet created >building [mo]: targets for 0 po files that are out of date >building [man]: all manpages >updating environment: 36 added, 0 changed, 0 removed >reading sources... [ 2%] 0.10 >reading sources... [ 5%] 0.11 >reading sources... [ 8%] 0.12 >reading sources... [ 11%] 0.13 >reading sources... [ 13%] 0.14 >reading sources... [ 16%] 0.15 >reading sources... [ 19%] 0.7 >reading sources... [ 22%] 0.8 >reading sources... [ 25%] 0.9 >reading sources... [ 27%] appendices >reading sources... [ 30%] attributes >reading sources... [ 33%] basics >reading sources... [ 36%] callbacks >reading sources... [ 38%] callgraph >reading sources... [ 41%] cfg >reading sources... [ 44%] cpychecker >reading sources... [ 47%] examples >reading sources... [ 50%] gcc-overview >reading sources... [ 52%] gcc-with-python >reading sources... [ 55%] getting-involved >reading sources... [ 58%] gimple >reading sources... [ 61%] index >reading sources... [ 63%] lto >reading sources... [ 66%] misc >reading sources... [ 69%] operators >reading sources... [ 72%] options >reading sources... [ 75%] parameters >reading sources... [ 77%] passes >reading sources... [ 80%] preprocessor >reading sources... [ 83%] release-notes >reading sources... [ 86%] rtl >reading sources... [ 88%] success >reading sources... [ 91%] tables-of-passes >reading sources... [ 94%] tree >reading sources... [ 97%] versions >reading sources... [100%] working-with-c >looking for now-outdated files... none found >pickling environment... done >checking consistency... /builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/docs/gcc-with-python.rst:: WARNING: document isn't included in any toctree >done >writing... gcc-python-plugin.1 { basics gcc-overview examples working-with-c cfg tree gimple passes callbacks attributes cpychecker success getting-involved misc callgraph lto options parameters preprocessor versions rtl release-notes 0.15 0.14 0.13 0.12 0.11 0.10 0.9 0.8 0.7 appendices tables-of-passes operators } gcc-with-python.1 { } >build succeeded, 1 warning. >Build finished. The manual pages are in _build/man. >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/docs' ># Fixup the generic manpage for this build: >cp docs/_build/man/gcc-with-python.1 gcc-with-python2_debug.1 >sed \ > -i \ > -e"s|gcc-with-python|gcc-with-python2_debug|g" \ > gcc-with-python2_debug.1 >sed \ > -i \ > -e"s|GCC-WITH-PYTHON|GCC-WITH-PYTHON2_DEBUG|g" \ > gcc-with-python2_debug.1 >rm -f gcc-with-python2_debug.1.gz >gzip gcc-with-python2_debug.1 >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cd gcc-c-api && make install >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/gcc-c-api' >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cp libgcc-c-api.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2_debug/gcc-c-api' >cp python2_debug.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug >cp -a gccutils /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug >cp -a libcpychecker /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug ># Create "gcc-with-" support script: >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin >install -m 755 gcc-with-python /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/bin/gcc-with-python2_debug ># Fixup the reference to the plugin in that script, from being expressed as ># a DSO filename with a path (for a working copy) to a name of an installed ># plugin within GCC's search directory: >sed \ > -i \ > -e"s|-fplugin=[^ ]*|-fplugin=python2_debug|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python2_debug ># name for this specific build: >sed \ > -i \ > -e"s|-fplugin-arg-python-script|-fplugin-arg-python2_debug-script|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python2_debug >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >cp gcc-with-python2_debug.1.gz /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >+ popd >~/build/BUILD/gcc-python-plugin-0.15 >+ InstallPlugin python3 python3-config python3.so python3 >+ PythonExe=python3 >+ PythonConfig=python3-config >+ PluginDso=python3.so >+ PluginName=python3 >+ BuildDir=../gcc-python-plugin-0.15-building-for-python3 >+ pushd ../gcc-python-plugin-0.15-building-for-python3 >+ make install DESTDIR=/builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 PLUGIN_NAME=python3 PLUGIN_DSO=python3.so >~/build/BUILD/gcc-python-plugin-0.15-building-for-python3 ~/build/BUILD/gcc-python-plugin-0.15 >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >cd docs && make man >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/docs' >sphinx-build -b man -d _build/doctrees . _build/man >Running Sphinx v1.5.1 >making output directory... >loading pickled environment... not yet created >building [mo]: targets for 0 po files that are out of date >building [man]: all manpages >updating environment: 36 added, 0 changed, 0 removed >reading sources... [ 2%] 0.10 >reading sources... [ 5%] 0.11 >reading sources... [ 8%] 0.12 >reading sources... [ 11%] 0.13 >reading sources... [ 13%] 0.14 >reading sources... [ 16%] 0.15 >reading sources... [ 19%] 0.7 >reading sources... [ 22%] 0.8 >reading sources... [ 25%] 0.9 >reading sources... [ 27%] appendices >reading sources... [ 30%] attributes >reading sources... [ 33%] basics >reading sources... [ 36%] callbacks >reading sources... [ 38%] callgraph >reading sources... [ 41%] cfg >reading sources... [ 44%] cpychecker >reading sources... [ 47%] examples >reading sources... [ 50%] gcc-overview >reading sources... [ 52%] gcc-with-python >reading sources... [ 55%] getting-involved >reading sources... [ 58%] gimple >reading sources... [ 61%] index >reading sources... [ 63%] lto >reading sources... [ 66%] misc >reading sources... [ 69%] operators >reading sources... [ 72%] options >reading sources... [ 75%] parameters >reading sources... [ 77%] passes >reading sources... [ 80%] preprocessor >reading sources... [ 83%] release-notes >reading sources... [ 86%] rtl >reading sources... [ 88%] success >reading sources... [ 91%] tables-of-passes >reading sources... [ 94%] tree >reading sources... [ 97%] versions >reading sources... [100%] working-with-c >looking for now-outdated files... none found >pickling environment... done >checking consistency... /builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/docs/gcc-with-python.rst:: WARNING: document isn't included in any toctree >done >writing... gcc-python-plugin.1 { basics gcc-overview examples working-with-c cfg tree gimple passes callbacks attributes cpychecker success getting-involved misc callgraph lto options parameters preprocessor versions rtl release-notes 0.15 0.14 0.13 0.12 0.11 0.10 0.9 0.8 0.7 appendices tables-of-passes operators } gcc-with-python.1 { } >build succeeded, 1 warning. >Build finished. The manual pages are in _build/man. >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/docs' ># Fixup the generic manpage for this build: >cp docs/_build/man/gcc-with-python.1 gcc-with-python3.1 >sed \ > -i \ > -e"s|gcc-with-python|gcc-with-python3|g" \ > gcc-with-python3.1 >sed \ > -i \ > -e"s|GCC-WITH-PYTHON|GCC-WITH-PYTHON3|g" \ > gcc-with-python3.1 >rm -f gcc-with-python3.1.gz >gzip gcc-with-python3.1 >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cd gcc-c-api && make install >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/gcc-c-api' >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cp libgcc-c-api.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3/gcc-c-api' >cp python3.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3 >cp -a gccutils /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3 >cp -a libcpychecker /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3 ># Create "gcc-with-" support script: >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin >install -m 755 gcc-with-python /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/bin/gcc-with-python3 ># Fixup the reference to the plugin in that script, from being expressed as ># a DSO filename with a path (for a working copy) to a name of an installed ># plugin within GCC's search directory: >sed \ > -i \ > -e"s|-fplugin=[^ ]*|-fplugin=python3|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python3 ># name for this specific build: >sed \ > -i \ > -e"s|-fplugin-arg-python-script|-fplugin-arg-python3-script|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python3 >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >cp gcc-with-python3.1.gz /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >~/build/BUILD/gcc-python-plugin-0.15 >~/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug ~/build/BUILD/gcc-python-plugin-0.15 >+ popd >+ InstallPlugin python3-debug python3.6dm-config python3_debug.so python3_debug >+ PythonExe=python3-debug >+ PythonConfig=python3.6dm-config >+ PluginDso=python3_debug.so >+ PluginName=python3_debug >+ BuildDir=../gcc-python-plugin-0.15-building-for-python3_debug >+ pushd ../gcc-python-plugin-0.15-building-for-python3_debug >+ make install DESTDIR=/builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64 PLUGIN_NAME=python3_debug PLUGIN_DSO=python3_debug.so >Makefile:193: warning: overriding recipe for target 'autogenerated-casts.c' >Makefile:190: warning: ignoring old recipe for target 'autogenerated-casts.c' >cd docs && make man >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/docs' >sphinx-build -b man -d _build/doctrees . _build/man >Running Sphinx v1.5.1 >making output directory... >loading pickled environment... not yet created >building [mo]: targets for 0 po files that are out of date >building [man]: all manpages >updating environment: 36 added, 0 changed, 0 removed >reading sources... [ 2%] 0.10 >reading sources... [ 5%] 0.11 >reading sources... [ 8%] 0.12 >reading sources... [ 11%] 0.13 >reading sources... [ 13%] 0.14 >reading sources... [ 16%] 0.15 >reading sources... [ 19%] 0.7 >reading sources... [ 22%] 0.8 >reading sources... [ 25%] 0.9 >reading sources... [ 27%] appendices >reading sources... [ 30%] attributes >reading sources... [ 33%] basics >reading sources... [ 36%] callbacks >reading sources... [ 38%] callgraph >reading sources... [ 41%] cfg >reading sources... [ 44%] cpychecker >reading sources... [ 47%] examples >reading sources... [ 50%] gcc-overview >reading sources... [ 52%] gcc-with-python >reading sources... [ 55%] getting-involved >reading sources... [ 58%] gimple >reading sources... [ 61%] index >reading sources... [ 63%] lto >reading sources... [ 66%] misc >reading sources... [ 69%] operators >reading sources... [ 72%] options >reading sources... [ 75%] parameters >reading sources... [ 77%] passes >reading sources... [ 80%] preprocessor >reading sources... [ 83%] release-notes >reading sources... [ 86%] rtl >reading sources... [ 88%] success >reading sources... [ 91%] tables-of-passes >reading sources... [ 94%] tree >reading sources... [ 97%] versions >reading sources... [100%] working-with-c >looking for now-outdated files... none found >pickling environment... done >checking consistency... /builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/docs/gcc-with-python.rst:: WARNING: document isn't included in any toctree >done >writing... gcc-python-plugin.1 { basics gcc-overview examples working-with-c cfg tree gimple passes callbacks attributes cpychecker success getting-involved misc callgraph lto options parameters preprocessor versions rtl release-notes 0.15 0.14 0.13 0.12 0.11 0.10 0.9 0.8 0.7 appendices tables-of-passes operators } gcc-with-python.1 { } >build succeeded, 1 warning. >Build finished. The manual pages are in _build/man. >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/docs' ># Fixup the generic manpage for this build: >cp docs/_build/man/gcc-with-python.1 gcc-with-python3_debug.1 >sed \ > -i \ > -e"s|gcc-with-python|gcc-with-python3_debug|g" \ > gcc-with-python3_debug.1 >sed \ > -i \ > -e"s|GCC-WITH-PYTHON|GCC-WITH-PYTHON3_DEBUG|g" \ > gcc-with-python3_debug.1 >rm -f gcc-with-python3_debug.1.gz >gzip gcc-with-python3_debug.1 >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cd gcc-c-api && make install >make[1]: Entering directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/gcc-c-api' >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >cp libgcc-c-api.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >make[1]: Leaving directory '/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python3_debug/gcc-c-api' >cp python3_debug.so /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug >cp -a gccutils /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug >cp -a libcpychecker /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug ># Create "gcc-with-" support script: >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin >install -m 755 gcc-with-python /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64//usr/bin/gcc-with-python3_debug ># Fixup the reference to the plugin in that script, from being expressed as ># a DSO filename with a path (for a working copy) to a name of an installed ># plugin within GCC's search directory: >sed \ > -i \ > -e"s|-fplugin=[^ ]*|-fplugin=python3_debug|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python3_debug ># name for this specific build: >sed \ > -i \ > -e"s|-fplugin-arg-python-script|-fplugin-arg-python3_debug-script|" \ > /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/bin/gcc-with-python3_debug >mkdir -p /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >cp gcc-with-python3_debug.1.gz /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/share/man/man1 >+ popd >~/build/BUILD/gcc-python-plugin-0.15 >+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 /builddir/build/BUILD/gcc-python-plugin-0.15 >extracting debug info from /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2_debug.so >extracting debug info from /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3.so >extracting debug info from /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python3_debug.so >extracting debug info from /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/python2.so >extracting debug info from /builddir/build/BUILDROOT/gcc-python-plugin-0.15-11.fc26.ppc64/usr/lib/gcc/ppc64-redhat-linux/7/plugin/libgcc-c-api.so >/usr/lib/rpm/sepdebugcrcfix: Updated 5 CRC32s, 0 CRC32s did match. >14111 blocks >+ /usr/lib/rpm/check-buildroot >+ /usr/lib/rpm/brp-compress >+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip >+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 >+ /usr/lib/rpm/brp-python-hardlink >Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.iwFdKD >+ umask 022 >+ cd /builddir/build/BUILD >+ cd gcc-python-plugin-0.15 >~/build/BUILD/gcc-python-plugin-0.15-building-for-python2 ~/build/BUILD/gcc-python-plugin-0.15 >+ CheckPlugin python python-config python2.so python2 >+ PythonExe=python >+ PythonConfig=python-config >+ PluginDso=python2.so >+ PluginName=python2 >+ SelftestArgs= >+ BuildDir=../gcc-python-plugin-0.15-building-for-python2 >+ pushd ../gcc-python-plugin-0.15-building-for-python2 >+ LD_LIBRARY_PATH=gcc-c-api >+ PLUGIN_NAME=python2 >+ python run-test-suite.py >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering j.1 == (const unsigned int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:22' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering range: 1 <= j.1 <= 0xffffffff' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,8 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/arrays2/input.c', line=38), value=6) >- str(): (int)6 from tests/cpychecker/absinterp/arrays2/input.c:38 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays2/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test_arrays2': >+tests/cpychecker/absinterp/arrays2/input.c:31:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,17 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct Foo * from tests/cpychecker/absinterp/arrays3/input.c:37 as non-NULL' >- 'returning' >- Return value: >- repr(): UnknownValue(gcctype=gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('char'))), loc=gcc.Location(file='tests/cpychecker/absinterp/arrays3/input.c', line=37)) >- str(): unknown const char * from tests/cpychecker/absinterp/arrays3/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays3/input.c:36 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct Foo * from tests/cpychecker/absinterp/arrays3/input.c:37 as NULL' >- error: NullPtrDereference() >- error: possibly dereferencing NULL (D.nnnnn->fieldA) at tests/cpychecker/absinterp/arrays3/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays3/input.c:36 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/absinterp/arrays3/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/pointers/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,6 +0,0 @@ >-Trace 0: >- Transitions: >- error: UsageOfUninitializedData() >- error: usage of uninitialized data (D.nnnnn) on right-hand side of + at tests/cpychecker/absinterp/arrays6/input.c:35 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays6/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,3 +1,36 @@ > In function 'test_arrays6': >-tests/cpychecker/absinterp/arrays6/input.c:35:nn: warning: usage of uninitialized data (D.nnnnn) on right-hand side of + at tests/cpychecker/absinterp/arrays6/input.c:35 >-tests/cpychecker/absinterp/arrays6/input.c:26:nn: note: graphical error report for function 'test_arrays6' written out to 'tests/cpychecker/absinterp/arrays6/input.c.test_arrays6-refcount-errors.html' >+tests/cpychecker/absinterp/arrays6/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arrays2: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arrays2/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arrays2/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arrays2/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arrays2/input.c: In function 'test_arrays2': > tests/cpychecker/absinterp/arrays2/input.c:31:8: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arrays3: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arrays3/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arrays3/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arrays3/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arrays3/input.c: In function 'test': > tests/cpychecker/absinterp/arrays3/input.c:37:21: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arrays4: OK >tests/cpychecker/absinterp/arrays6: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arrays6/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arrays6/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arrays6/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arrays6/input.c: In function 'test_arrays6': > tests/cpychecker/absinterp/arrays6/input.c:35:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > m--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,72 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup/input.c:43 as non-NULL' >- 'taking False path' >- 'when treating unknown const char * from tests/cpychecker/absinterp/custom-strdup/input.c:38 as non-NULL' >- 'when considering range: -128 <= value <= -1' >- 'taking True path' >- 'when considering value == (const char)0 from tests/cpychecker/absinterp/custom-strdup/input.c:50' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='void *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup/input.c', line=45), region=Region('heap-region-0')) >- str(): (void *)&Region('heap-region-0') from tests/cpychecker/absinterp/custom-strdup/input.c:45 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup/input.c:39 >- >-Trace 1: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup/input.c:43 as non-NULL' >- 'taking False path' >- 'when treating unknown const char * from tests/cpychecker/absinterp/custom-strdup/input.c:38 as non-NULL' >- 'when considering value == (const char)0 from tests/cpychecker/absinterp/custom-strdup/input.c:50' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='void *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup/input.c', line=45), region=Region('heap-region-0')) >- str(): (void *)&Region('heap-region-0') from tests/cpychecker/absinterp/custom-strdup/input.c:45 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup/input.c:39 >- >-Trace 2: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup/input.c:43 as non-NULL' >- 'taking False path' >- 'when treating unknown const char * from tests/cpychecker/absinterp/custom-strdup/input.c:38 as non-NULL' >- 'when considering range: 1 <= value <= 127' >- 'taking True path' >- 'when considering value == (const char)0 from tests/cpychecker/absinterp/custom-strdup/input.c:50' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='void *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup/input.c', line=45), region=Region('heap-region-0')) >- str(): (void *)&Region('heap-region-0') from tests/cpychecker/absinterp/custom-strdup/input.c:45 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup/input.c:39 >- >-Trace 3: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup/input.c:43 as non-NULL' >- 'taking False path' >- 'when treating unknown const char * from tests/cpychecker/absinterp/custom-strdup/input.c:38 as NULL' >- error: NullPtrDereference() >- error: possibly dereferencing NULL (*str) at tests/cpychecker/absinterp/custom-strdup/input.c:50 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup/input.c:39 >- >-Trace 4: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup/input.c:43 as NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='char *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup/input.c', line=46), value=0) >- str(): (char *)0 from tests/cpychecker/absinterp/custom-strdup/input.c:46 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup/input.c:39 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,7 +1,32 @@ > In function 'test_strdup': >-tests/cpychecker/absinterp/custom-strdup/input.c:50:nn: warning: possibly dereferencing NULL (*str) at tests/cpychecker/absinterp/custom-strdup/input.c:50 >-tests/cpychecker/absinterp/custom-strdup/input.c:45:nn: note: when treating unknown void * from tests/cpychecker/absinterp/custom-strdup/input.c:43 as non-NULL at: if (!result) { >-tests/cpychecker/absinterp/custom-strdup/input.c:45:nn: note: taking False path at: if (!result) { >-tests/cpychecker/absinterp/custom-strdup/input.c:49:nn: note: reaching: dst = result; >-tests/cpychecker/absinterp/custom-strdup/input.c:50:nn: note: when treating unknown const char * from tests/cpychecker/absinterp/custom-strdup/input.c:38 as NULL at: while (*str) { >-tests/cpychecker/absinterp/custom-strdup/input.c:39:nn: note: graphical error report for function 'test_strdup' written out to 'tests/cpychecker/absinterp/custom-strdup/input.c.test_strdup-refcount-errors.html' >+tests/cpychecker/absinterp/custom-strdup/input.c:43:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall >+ None)], >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-two-value-range: OK >tests/cpychecker/absinterp/comparisons/boundaries/WithinRange-eq-ConcreteValue-in-middle: OK >tests/cpychecker/absinterp/comparisons/pointers: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/pointers/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/pointers/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/pointers/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/pointers/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/pointers/input.c:30:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/custom-strdup: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/custom-strdup/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/custom-strdup/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/custom-strdup/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/custom-strdup/input.c: In function 'test_strdup': > tests/cpychecker/absinterp/custom-strdup/input.c:43:38: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown char * * from tests/cpychecker/absinterp/arrays7/input.c:27 as non-NULL' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='char[4] *', loc=gcc.Location(file='tests/cpychecker/absinterp/arrays7/input.c', line=32), region=ArrayElementRegion('foo[0]')) >- str(): (char[4] *)&ArrayElementRegion('foo[0]') from tests/cpychecker/absinterp/arrays7/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays7/input.c:28 >- >-Trace 1: >- Transitions: >- 'when treating unknown char * * from tests/cpychecker/absinterp/arrays7/input.c:27 as NULL' >- error: NullPtrDereference() >- error: possibly dereferencing NULL (*arr) at tests/cpychecker/absinterp/arrays7/input.c:35 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays7/input.c:28 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/absinterp/arrays7/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,40 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:46 as non-NULL' >- 'taking False path' >- 'when taking True path' >- 'when considering value == (const char)0 from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:53' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='void *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup-with-attr/input.c', line=48), region=Region('heap-region-0')) >- str(): (void *)&Region('heap-region-0') from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:48 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:42 >- >-Trace 1: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:46 as non-NULL' >- 'taking False path' >- 'when taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='void *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup-with-attr/input.c', line=48), region=Region('heap-region-0')) >- str(): (void *)&Region('heap-region-0') from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:48 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:42 >- >-Trace 2: >- Transitions: >- 'when treating unknown void * from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:46 as NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='char *', loc=gcc.Location(file='tests/cpychecker/absinterp/custom-strdup-with-attr/input.c', line=49), value=0) >- str(): (char *)0 from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:49 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:42 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test_strdup': >+tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:46:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall >+ None)], >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/absinterp/casts/int-to-float/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >axtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arrays7: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arrays7/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arrays7/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arrays7/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arrays7/input.c: In function 'test': > tests/cpychecker/absinterp/arrays7/input.c:35:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/asm/empty: OK >tests/cpychecker/absinterp/assignment-from-string-const: OK >tests/cpychecker/absinterp/casts/int-to-float: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/casts/int-to-float/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/casts/int-to-float/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/casts/int-to-float/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/casts/int-to-float/input.c: In function 'test': > tests/cpychecker/absinterp/casts/int-to-float/input.c:30:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15---- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- '__dump((int)0 from tests/cpychecker/absinterp/arithmetic/correct/input.c:31)' >- '__dump((int)1 from tests/cpychecker/absinterp/arithmetic/correct/input.c:33)' >- '__dump((int)2 from tests/cpychecker/absinterp/arithmetic/correct/input.c:34)' >- '__dump((int)2 from tests/cpychecker/absinterp/arithmetic/correct/input.c:36)' >- '__dump((int)0 from tests/cpychecker/absinterp/arithmetic/correct/input.c:37)' >- '__dump((int)1 from tests/cpychecker/absinterp/arithmetic/correct/input.c:38)' >- '__dump((int)-1 from tests/cpychecker/absinterp/arithmetic/correct/input.c:39)' >- '__dump((int)1 from tests/cpychecker/absinterp/arithmetic/correct/input.c:41)' >- '__dump((int)1 from tests/cpychecker/absinterp/arithmetic/correct/input.c:42)' >- '__dump((int)2570 from tests/cpychecker/absinterp/arithmetic/correct/input.c:47)' >- '__dump((int)-2571 from tests/cpychecker/absinterp/arithmetic/correct/input.c:51)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/arithmetic/correct/input.c', line=56), value=-5142) >- str(): (int)-5142 from tests/cpychecker/absinterp/arithmetic/correct/input.c:56 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arithmetic/correct/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/arithmetic/correct/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/casts/int-to-pointer/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,8 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/nested-fields/input.c', line=50), value=1110) >- str(): (int)1110 from tests/cpychecker/absinterp/nested-fields/input.c:50 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/nested-fields/input.c:40 >2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall > None)], > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/custom-strdup-with-attr: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/custom-strdup-with-attr/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/custom-strdup-with-attr/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/custom-strdup-with-attr/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/custom-strdup-with-attr/input.c: In function 'test_strdup': > tests/cpychecker/absinterp/custom-strdup-with-attr/input.c:46:38: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall > None)], > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/exceptions: OK >tests/cpychecker/absinterp/exit: OK >tests/cpychecker/absinterp/function-pointers: OK >tests/cpychecker/absinterp/nested-fields: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/nested-fields/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/nested-fields/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/nested-fields/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/nested-fields/input.c: In function 'test_nested': > tests/cpychecker/absinterp/nested-fields/input.c:50:23: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python---- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test_nested': >+tests/cpychecker/absinterp/nested-fields/input.c:50:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/absinterp/casts/int-to-pointer2/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall >+ None)], >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/casts/int-to-pointer: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/casts/int-to-pointer/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/casts/int-to-pointer/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/casts/int-to-pointer/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/casts/int-to-pointer/input.c: In function 'test': > tests/cpychecker/absinterp/casts/int-to-pointer/input.c:34:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/casts/int-to-pointer2: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/casts/int-to-pointer2/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/casts/int-to-pointer2/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/casts/int-to-pointer2/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/casts/int-to-pointer2/input.c: In function 'test': > tests/cpychecker/absinterp/casts/int-to-pointer2/input.c:33:19: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall > None)], > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_r--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,17 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering j == (unsigned int)0 from tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:28' >- error: PredictedArithmeticError() >- error: possible integer division or modulo by zero with right-hand-side (unsigned int)0 from tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:28 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:29 >- >-Trace 1: >- Transitions: >- 'when considering range: 1 <= j <= 0xffffffff' >- 'returning' >- Return value: >- repr(): WithinRange(gcctype='unsigned int', loc=gcc.Location(file='tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c', line=30), minvalue=0, maxvalue=0x7fffffff) >- str(): (unsigned int)val [0 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:30 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:29 >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,17 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct FooType * from tests/cpychecker/absinterp/nested-fields2/input.c:41 as non-NULL' >- 'returning' >- Return value: >- repr(): WithinRange(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/nested-fields2/input.c', line=41), minvalue=-0x80000000, maxvalue=0x7fffffff) >- str(): (int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/nested-fields2/input.c:41 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/nested-fields2/input.c:34 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct FooType * from tests/cpychecker/absinterp/nested-fields2/input.c:41 as NULL' >- error: NullPtrDereference() >- error: possibly dereferencing NULL (D.nnnnn->field) at tests/cpychecker/absinterp/nested-fields2/input.c:41 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/nested-fields2/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test_nested': >+tests/cpychecker/absinterp/nested-fields2/input.c:41:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: 0 <= j.0 <= 0xfffffffe' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering j.0 == (const unsigned int)0xffffffff from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:22' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,6 +0,0 @@ >-Trace 0: >- Transitions: >- error: UsageOfUninitializedData() >- error: dereferencing uninitialized pointer (D.nnnnn->field) at tests/cpychecker/absinterp/nested-fields3/input.c:42 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/nested-fields3/input.c:34 >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering j.1 == (const unsigned int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:22' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering range: 1 <= j.1 <= 0xffffffff' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,3 +1,32 @@ > In function 'test_nested': >-tests/cpychecker/absinterp/nested-fields3/input.c:42:nn: warning: dereferencing uninitialized pointer (D.nnnnn->field) at tests/cpychecker/absinterp/nested-fields3/input.c:42 >-tests/cpychecker/absinterp/nested-fields3/input.c:34:nn: note: graphical error report for function 'test_nested' written out to 'tests/cpychecker/absinterp/nested-fields3/input.c.test_nested-refcount-errors.html' >+tests/cpychecker/absinterp/nested-fields3/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/nested-fields2: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/nested-fields2/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/nested-fields2/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/nested-fields2/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/nested-fields2/input.c: In function 'test_nested': > tests/cpychecker/absinterp/nested-fields2/input.c:41:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/nested-fields3: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/nested-fields3/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/nested-fields3/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/nested-fields3/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/nested-fields3/input.c: In function 'test_nested': > tests/cpychecker/absinterp/nested-fields3/input.c:42:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,9 +0,0 @@ >-Trace 0: >- Transitions: >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c', line=35), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c:35 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >egion > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange: FAIL >returncode: 1 > compiling: gcc--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering j.1 == (const unsigned int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:22' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering range: 1 <= j.1 <= 0xffffffff' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:31 as non-NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): WithinRange(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c', line=36), minvalue=-0x80000000, maxvalue=0x7fffffff) >- str(): (int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:36 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:34 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:31 as NULL' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c', line=38), value=42) >- str(): (int)42 from tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:38 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test_read_through_global_with_check': >+tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,82 +0,0 @@ >-Trace 0: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: -0x80000000 <= value <= -1' >- 'taking True path' >- '__dump((int)val [-0x80000000 <= val <= -1] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/fully-checked/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:33 >- >-Trace 1: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 0x7fffffff' >- 'taking False path' >- '__dump((int)val [0 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 11' >- 'taking False path' >- '__dump((int)val [0 <= val <= 11] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: -128 <= value <= 7' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/fully-checked/input.c', line=56), value=3) >- str(): (int)3 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:56 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:33 >- >-Trace 2: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 0x7fffffff' >- 'taking False path' >- '__dump((int)val [0 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 11' >- 'taking False path' >- '__dump((int)val [0 <= val <= 11] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering value == (char)8 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:53' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/fully-checked/input.c', line=54), value=2) >- str(): (int)2 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:54 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:33 >- >-Trace 3: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 0x7fffffff' >- 'taking False path' >- '__dump((int)val [0 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 11' >- 'taking False path' >- '__dump((int)val [0 <= val <= 11] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 9 <= value <= 127' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/fully-checked/input.c', line=56), value=3) >- str(): (int)3 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:56 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:33 >- >-Trace 4: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 0 <= value <= 0x7fffffff' >- 'taking False path' >- '__dump((int)val [0 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'when considering range: 12 <= value <= 0x7fffffff' >- 'taking True path' >- '__dump((int)val [12 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/fully-checked/input.c:32)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/fully-checked/input.c', line=47), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:47 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/fully-checked/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,46 @@ >+In function 'test': >+tests/cpychecker/absinterp/array-range/fully-checked/input.c:53:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/Py_BuildValue/code_f/correct: OK >tests/cpychecker/Py_BuildValue/code_lower_d/correct: OK >tests/cpychecker/Py_BuildValue/code_s_hash/correct: OK >tests/cpychecker/Py_BuildValue/code_u/correct: OK >tests/cpychecker/Py_BuildValue/code_u_hash/correct: OK >tests/cpychecker/Py_BuildValue/code_upper_D/correct: OK >tests/cpychecker/Py_BuildValue/code_upper_D/incorrect: OK >tests/cpychecker/absinterp/arithmetic/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arithmetic/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arithmetic/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arithmetic/correct/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arithmetic/correct/input.c: In function 'test': > tests/cpychecker/absinterp/arithmetic/correct/input.c:33:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arithmetic/division-by-zero/definite: OK >tests/cpychecker/absinterp/arithmetic/division-by-zero/possible: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c: In function 'test': > tests/cpychecker/absinterp/arithmetic/division-by-zero/possible/input.c:30:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arithmetic/fix-trunc-expr: OK >tests/cpychecker/absinterp/arithmetic/negative-shift/possible: OK >tests/cpychecker/absinterp/array-range/fully-checked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/array-range/fully-checked/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/array-range/fully-checked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/array-range/fully-checked/input.c >Stdout: >Stderr: > tests/cpychecker/absinte--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: 0 <= j.0 <= 0xfffffffe' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering j.0 == (const unsigned int)0xffffffff from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:22' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) > -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange/input.c:34:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteVa--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,17 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:31 as non-NULL' >- 'returning' >- Return value: >- repr(): WithinRange(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c', line=35), minvalue=-0x80000000, maxvalue=0x7fffffff) >- str(): (int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:34 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:31 as NULL' >- error: NullPtrDereference() >- error: possibly dereferencing NULL (coord_ptr.0->x) at tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,4 +1,32 @@ > In function 'test_read_through_global_without_check': >-tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35:nn: warning: possibly dereferencing NULL (coord_ptr.0->x) at tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35 >-tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35:nn: note: when treating unknown struct coord * from tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:31 as NULL at: return coord_ptr->x; >-tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:34:nn: note: graphical error report for function 'test_read_through_global_without_check' written out to 'tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c.test_read_through_global_without_check-refcount-errors.html' >+tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,41 +0,0 @@ >-Trace 0: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:32)' >- '__dump((int)val [0 <= val <= 255] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:37)' >- '__dump((int)val [0 <= val <= 7] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:41)' >- 'when considering range: -128 <= value <= 7' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/implicitly-correct/input.c', line=48), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:48 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:33 >- >-Trace 1: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:32)' >- '__dump((int)val [0 <= val <= 255] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:37)' >- '__dump((int)val [0 <= val <= 7] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:41)' >- 'when considering value == (char)8 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:45' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/implicitly-correct/input.c', line=46), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:46 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:33 >- >-Trace 2: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:32)' >- '__dump((int)val [0 <= val <= 255] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:37)' >- '__dump((int)val [0 <= val <= 7] from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:41)' >- 'when considering range: 9 <= value <= 127' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/implicitly-correct/input.c', line=48), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:48 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,42 @@ >+In function 'test': >+tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:45:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >rp/array-range/fully-checked/input.c: In function 'test': > tests/cpychecker/absinterp/array-range/fully-checked/input.c:53:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/array-range/implicitly-correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/array-range/implicitly-correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/array-range/implicitly-correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/array-range/implicitly-correct/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/array-range/implicitly-correct/input.c: In function 'test': > tests/cpychecker/absinterp/array-range/implicitly-correct/input.c:45:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <ty--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,9 +0,0 @@ >-Trace 0: >- Transitions: >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c', line=38), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c:38 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,57 +0,0 @@ >-Trace 0: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering range: -0x80000000 <= value <= 12' >- 'taking True path' >- '__dump((int)val [-0x80000000 <= val <= 12] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering range: -128 <= value <= 7' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/off-by-one/input.c', line=51), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:51 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:33 >- >-Trace 1: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering range: -0x80000000 <= value <= 12' >- 'taking True path' >- '__dump((int)val [-0x80000000 <= val <= 12] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering value == (char)8 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:48' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/off-by-one/input.c', line=49), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:49 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:33 >- >-Trace 2: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering range: -0x80000000 <= value <= 12' >- 'taking True path' >- '__dump((int)val [-0x80000000 <= val <= 12] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering range: 9 <= value <= 127' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/off-by-one/input.c', line=51), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:51 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:33 >- >-Trace 3: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'when considering range: 13 <= value <= 0x7fffffff' >- 'taking False path' >- '__dump((int)val [13 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/off-by-one/input.c:32)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/off-by-one/input.c', line=56), value=2) >- str(): (int)2 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:56 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/off-by-one/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'test': >+tests/cpychecker/absinterp/array-range/off-by-one/input.c:48:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: 0 <= j.0 <= 0xfffffffe' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering j.0 == (const unsigned int)0xffffffff from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:22' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >lue-gt-max-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange/input.c:35:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=s--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,10 +0,0 @@ >-Trace 0: >- Transitions: >- '__dump((short int)42 from tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:39)' >- '__dump((short int)0 from tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:42)' >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:33)' >- '__dump((int)val [1 <= val <= 8] from tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:46)' >- '__dump((short int)0 from tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:51)' >- 'returning' >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:41:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering j.1 == (const unsigned int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:22' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:26 >- >-Trace 1: >- Transitions: >- 'when considering range: 1 <= j.1 <= 0xffffffff' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,35 +0,0 @@ >-Trace 0: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/unchecked/input.c:32)' >- 'when considering range: -128 <= value <= 7' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/unchecked/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/unchecked/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/unchecked/input.c:33 >- >-Trace 1: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/unchecked/input.c:32)' >- 'when considering value == (char)8 from tests/cpychecker/absinterp/array-range/unchecked/input.c:36' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/unchecked/input.c', line=37), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/unchecked/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/unchecked/input.c:33 >- >-Trace 2: >- Transitions: >- '__dump((int)val [-0x80000000 <= val <= 0x7fffffff] from tests/cpychecker/absinterp/array-range/unchecked/input.c:32)' >- 'when considering range: 9 <= value <= 127' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/unchecked/input.c', line=39), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/unchecked/input.c:39 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/unchecked/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/array-range/unchecked/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >pe 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/array-range/off-by-one: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/array-range/off-by-one/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/array-range/off-by-one/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/array-range/off-by-one/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/array-range/off-by-one/input.c: In function 'test': > tests/cpychecker/absinterp/array-range/off-by-one/input.c:48:18: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/array-range/partial-initialization-on-stack: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c: In function 'test': > tests/cpychecker/absinterp/array-range/partial-initialization-on-stack/input.c:41:28: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/array-range/unchecked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/array-range/unchecked/output.o -fplugin=/builddir/b--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,9 +0,0 @@ >-Trace 0: >- Transitions: >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c', line=37), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >elf.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange/input.c:36:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c: In function 'test': > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange/input.c:34:11: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,26 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: -0x80000000 <= value <= -1' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/static-data/input.c', line=35), value=42) >- str(): (int)42 from tests/cpychecker/absinterp/static-data/input.c:35 >- >-Trace 1: >- Transitions: >- 'when considering value == (int)0 from tests/cpychecker/absinterp/static-data/input.c:24' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/static-data/input.c', line=37), value=43) >- str(): (int)43 from tests/cpychecker/absinterp/static-data/input.c:37 >- >-Trace 2: >- Transitions: >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/static-data/input.c', line=35), value=42) >- str(): (int)42 from tests/cpychecker/absinterp/static-data/input.c:35 >isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/nonnull-attribute: OK >tests/cpychecker/absinterp/read-through-global-ptr-checked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/read-through-global-ptr-checked/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/read-through-global-ptr-checked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c: In function 'test_read_through_global_with_check': > tests/cpychecker/absinterp/read-through-global-ptr-checked/input.c:35:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/read-through-global-ptr-unchecked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/read-through-global-ptr-unchecked/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/read-through-global-ptr-unchecked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c: In function 'test_read_through_global_without_check': > tests/cpychecker/absinterp/read-through-global-ptr-unchecked/input.c:35:21: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/read-through-uninitialized-ptr: OK >tests/cpychecker/absinterp/real-cst/regular: OK >tests/cpychecker/absinterp/result-decl: OK >tests/cpychecker/absinterp/static-data: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/static-data/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/static-data/script.py -fsigned-char tests/cpychecker/absinterp/static-data/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/static-data/input.c: In function 'test--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/absinterp/static-data/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_SetNone()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c:30 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,49 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: -0x80000000 <= value <= 11' >- 'taking True path' >- 'when considering range: -128 <= value <= 7' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/upper-checked/input.c', line=40), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:40 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:31 >- >-Trace 1: >- Transitions: >- 'when considering range: -0x80000000 <= value <= 11' >- 'taking True path' >- 'when considering value == (char)8 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:37' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/upper-checked/input.c', line=38), value=0) >- str(): (int)0 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:38 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:31 >- >-Trace 2: >- Transitions: >- 'when considering range: -0x80000000 <= value <= 11' >- 'taking True path' >- 'when considering range: 9 <= value <= 127' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/upper-checked/input.c', line=40), value=1) >- str(): (int)1 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:40 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:31 >- >-Trace 3: >- Transitions: >- 'when considering range: 12 <= value <= 0x7fffffff' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/array-range/upper-checked/input.c', line=44), value=2) >- str(): (int)2 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:44 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/array-range/upper-checked/input.c:31 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/absinterp/array-range/upper-checked/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_SetObject()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c', line=31), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c:31 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 2 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >': > tests/cpychecker/absinterp/static-data/input.c:34:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyErr_SetNone/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_SetNone/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_SetNone/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_SetNone/correct/input.c:29:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyErr_SetObject/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_SetObject/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_SetObject/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_SetObject/correct/input.c:29:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transiti--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,8 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/arrays/input.c', line=31), value=42) >- str(): (int)42 from tests/cpychecker/absinterp/arrays/input.c:31 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/arrays/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test_arrays': >+tests/cpychecker/absinterp/arrays/input.c:31:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >uild/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/array-range/unchecked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/array-range/unchecked/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/array-range/unchecked/input.c: In function 'test': > tests/cpychecker/absinterp/array-range/unchecked/input.c:36:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/array-range/upper-checked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/array-range/upper-checked/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/array-range/upper-checked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/array-range/upper-checked/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/array-range/upper-checked/input.c: In function 'test': > tests/cpychecker/absinterp/array-range/upper-checked/input.c:37:18: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/arrays: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/arrays/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/arrays/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/arrays/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/arrays/input.c: In function 'test_arrays': > tests/cpychecker/absinterp/arrays/input.c:31:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/l--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_SetString()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetString/correct/input.c', line=31), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_SetString/correct/input.c:31 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyErr_SetString/correct/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,138 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:29 as non-NULL' >- 'when PyList_Append() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37)) from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:33 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:29 as non-NULL' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=44), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:44 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:42 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:29 as non-NULL' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=44), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:44 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:42 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:29 as NULL' >- 'returning -1 from PyList_Append() due to NULL item' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=44), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:44 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:42 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:29 as NULL' >- 'returning -1 from PyList_Append() due to NULL item' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=44), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:44 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=37)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:42 >- >-Trace 5: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:37 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,46 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: -0x80000000 <= value <= -1' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/uninitialized-data/input.c', line=54), value=2) >- str(): (int)2 from tests/cpychecker/absinterp/uninitialized-data/input.c:54 >- >-Trace 1: >- Transitions: >- 'when considering range: -0x80000000 <= value <= -1' >- 'taking False path' >- 'when taking False path' >- 'returning' >- Return value: >- repr(): UnknownValue(gcctype=gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('int'))), loc=gcc.Location(file='tests/cpychecker/absinterp/uninitialized-data/input.c', line=46)) >- str(): unknown int * from tests/cpychecker/absinterp/uninitialized-data/input.c:46 >- >-Trace 2: >- Transitions: >- 'when considering value == (int)0 from tests/cpychecker/absinterp/uninitialized-data/input.c:26' >- 'taking True path' >- error: UsageOfUninitializedData() >- error: comparison against uninitialized data (j.0) at tests/cpychecker/absinterp/uninitialized-data/input.c:35 >- >-Trace 3: >- Transitions: >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/absinterp/uninitialized-data/input.c', line=54), value=2) >- str(): (int)2 from tests/cpychecker/absinterp/uninitialized-data/input.c:54 >- >-Trace 4: >- Transitions: >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking False path' >- 'when taking False path' >- 'returning' >- Return value: >- repr(): UnknownValue(gcctype=gcc.PointerType(dereference=gcc.IntegerType(name=gcc.TypeDecl('int'))), loc=gcc.Location(file='tests/cpychecker/absinterp/uninitialized-data/input.c', line=46)) >- str(): unknown int * from tests/cpychecker/absinterp/uninitialized-data/input.c:46 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,6 +1,38 @@ > In function 'test_void': >-tests/cpychecker/absinterp/uninitialized-data/input.c:35:nn: warning: comparison against uninitialized data (j.0) at tests/cpychecker/absinterp/uninitialized-data/input.c:35 >-tests/cpychecker/absinterp/uninitialized-data/input.c:30:nn: note: when considering value == (int)0 from tests/cpychecker/absinterp/uninitialized-data/input.c:26 at: if (i == 0) { >-tests/cpychecker/absinterp/uninitialized-data/input.c:30:nn: note: taking True path at: if (i == 0) { >-tests/cpychecker/absinterp/uninitialized-data/input.c:35:nn: note: reaching: if (i < j) { >-tests/cpychecker/absinterp/uninitialized-data/input.c:27:nn: note: graphical error report for function 'test_void' written out to 'tests/cpychecker/absinterp/uninitialized-data/input.c.test_void-refcount-errors.html' >+tests/cpychecker/absinterp/uninitialized-data/input.c:53:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,40 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:26 as non-NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyList_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyList_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyList_GetItem()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyList_GetItem with NULL as argument 1 (some_list.0) at tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:32 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >ibcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_Append/ticket-22: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_Append/ticket-22/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_Append/ticket-22/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c: In function 'test': > tests/cpychecker/refcounts/PyList_Append/ticket-22/input.c:42:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_GetItem/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_GetItem/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_GetItem/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_GetItem/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_GetItem/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyList_GetItem/correct/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,64 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:26 as non-NULL' >- 'when PyDict_GetItem() succeeds' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyDict_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyDict_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyDict_GetItem()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:26 as non-NULL' >- 'when PyDict_GetItem does not find item' >- 'taking False path' >- 'calling PyErr_SetString()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >- >-Trace 2: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyDict_GetItem with NULL as argument 1 (some_dict.0) at tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:32 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,109 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27)) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:32: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=32)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:32 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=27)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:32 >- >-Trace 3: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:29 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:27 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_SET_ITEM_macro': >+tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:45:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,48 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyFloat_FromDouble() succeeds' >- 'PyFloat_AsDouble() returns ob_fval' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='double', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c', line=33), value=42.0) >- str(): (double)42.0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33 >- PyFloatObject allocated at tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33: >- repr(): RegionOnHeap('PyFloatObject', gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c', line=33)) >- str(): PyFloatObject allocated at tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyFloat_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyFloat_FromDouble() succeeds' >- 'PyFloat_AsDouble() returns ob_fval' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyFloatObject allocated at tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='double', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c', line=33), value=42.0) >- str(): (double)42.0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33 >- PyFloatObject allocated at tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33: >- repr(): RegionOnHeap('PyFloatObject', gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c', line=33)) >- str(): PyFloatObject allocated at tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyFloat_FromDouble() fails' >- 'PyFloat_AsDouble() fails due to NULL argument' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='double', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c', line=36), value=-1) >- str(): (double)-1 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:36 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:36 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >ons_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyErr_SetString/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_SetString/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_SetString/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_SetString/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_SetString/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_SetString/correct/input.c:29:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyEval_CallMethod/correct: OK >tests/cpychecker/refcounts/PyEval_CallMethod/incorrect: OK >tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c: In function 'test': > tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject/input.c:37:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plug--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,61 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:26 as non-NULL' >- 'when PyDict_GetItem() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=35), region=RegionOnHeap('borrowed reference returned by PyDict_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=35))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyDict_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=35)) from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=35), region=Region('PyTypeObject for borrowed reference returned by PyDict_GetItem()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:26 as non-NULL' >- 'when PyDict_GetItem does not find item' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:30 >- >-Trace 2: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyDict_GetItem with NULL as argument 1 (some_dict.0) at tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,13 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: warning: future use-after-free: ob_refcnt of return value is 1 too low >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: return value was allocated at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:26 as non-NULL at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: when PyDict_GetItem() succeeds at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: ob_refcnt is now refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: returning at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: warning: returning (PyObject*)NULL without setting an exception >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:26 as non-NULL at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: when PyDict_GetItem does not find item at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: note: returning at: return PyDict_GetItem(some_dict, args); >-tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:30:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyCObject_FromVoidPtr/incorrect: OK >tests/cpychecker/refcounts/PyCObject_FromVoidPtrAndDesc/incorrect: OK >tests/cpychecker/refcounts/PyCapsule_GetPointer/basic: OK >tests/cpychecker/refcounts/PyDict_GetItem/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_GetItem/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_GetItem/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_GetItem/correct/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_GetItem/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_GetItem/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_GetItem/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_GetItem/incorrect/input.c:35:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", l--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,15 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c:31 as non-NULL' >- 'taking True path' >- 'returning' >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c:34 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c:31 as NULL' >- 'taking False path' >- 'returning' >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test_write_through_global_with_check': >+tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/PyArg_Parse/incorrect_codes_S_and_U: OK >tests/cpychecker/PyArg_ParseTuple/code_O_bang: OK >tests/cpychecker/PyArg_ParseTuple/code_s/incorrect-constness: OK >tests/cpychecker/PyArg_ParseTuple/codes_accepting_null: OK >tests/cpychecker/PyArg_ParseTuple/correct_codes_S_and_U: OK >tests/cpychecker/PyArg_ParseTuple/correct_converter: OK >tests/cpychecker/PyArg_ParseTuple/encodings: OK >tests/cpychecker/PyArg_ParseTuple/incorrect_code_z_hash: OK >tests/cpychecker/PyArg_ParseTuple/incorrect_codes_S_and_U: OK >tests/cpychecker/PyArg_ParseTuple/incorrect_converters: OK >tests/cpychecker/PyArg_ParseTuple/keywords: OK >tests/cpychecker/PyArg_ParseTuple/typedefs: OK >tests/cpychecker/PyArg_ParseTuple/with_PY_SSIZE_T_CLEAN: OK >tests/cpychecker/PyArg_ParseTuple/without_PY_SSIZE_T_CLEAN: OK >tests/cpychecker/PyMethodDef/correct: OK >tests/cpychecker/PyMethodDef/incorrect-types: OK >tests/cpychecker/PyMethodDef/missing-sentinel: OK >tests/cpychecker/Py_BuildValue/code_O/subclass: OK >tests/cpychecker/Py_BuildValue/code_c/correct: OK >tests/cpychecker/absinterp/string-constants: OK >tests/cpychecker/absinterp/switch: OK >tests/cpychecker/absinterp/two-loops: OK >tests/cpychecker/absinterp/uninitialized-data: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/uninitialized-data/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/uninitialized-data/script.py -fsigned-char tests/cpychecker/absinterp/uninitialized-data/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/uninitialized-data/input.c: In function 'test_void': > tests/cpychecker/absinterp/uninitialized-data/input.c:53:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/void-return: OK >tests/cpychecker/absinterp/write-through-arg-unchecked: OK >tests/cpychecker/absinterp/write-through-global-ptr-checked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/write-through-global-ptr-checked/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/write-through-global-ptr-checked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c: In function 'test_write_through_global_with_check': > tests/cpychecker/absinterp/write-through-global-ptr-checked/input.c:35:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,647 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=50)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 7: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 8: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 9: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 10: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 11: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 12: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 13: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- >-Trace 14: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:33 >_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c: In function 'handle_SET_ITEM_macro': > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct/input.c:45:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c: In function 'handle_SET_ITEM_macro': > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39:16: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return se--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_SET_ITEM_macro': >+tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,14 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:31 as non-NULL' >- 'returning' >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:34 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct coord * from tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:31 as NULL' >- error: NullPtrDereference() >- error: possibly dereferencing NULL (coord_ptr.0->x) at tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:36 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,4 +1,32 @@ > In function 'test_write_through_global_without_check': >-tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:35:nn: warning: possibly dereferencing NULL (coord_ptr.0->x) at tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:36 >-tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:35:nn: note: when treating unknown struct coord * from tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:31 as NULL at: coord_ptr->x = x; >-tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:34:nn: note: graphical error report for function 'test_write_through_global_without_check' written out to 'tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c.test_write_through_global_without_check-refcount-errors.html' >+tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,64 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:26 as non-NULL' >- 'when PyDict_GetItemString() succeeds' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyDict_GetItemString()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyDict_GetItemString()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyDict_GetItemString()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:26 as non-NULL' >- 'PyDict_GetItemString does not find string' >- 'taking False path' >- 'calling PyErr_SetString()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >- >-Trace 2: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyDict_GetItemString with NULL as argument 1 (some_dict.0) at tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:32 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,72 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyFloat_AsDouble() succeeds' >- 'when taking True path' >- 'PyErr_Occurred()' >- 'taking False path' >- '__dump(unknown double from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:34)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=49), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:49 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:31 >- >-Trace 1: >- Transitions: >- 'when PyFloat_AsDouble() succeeds' >- 'when taking False path' >- '__dump(unknown double from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:34)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=49), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:49 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:31 >- >-Trace 2: >- Transitions: >- 'when PyFloat_AsDouble() fails' >- 'taking True path' >- 'PyErr_Occurred()' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1722, in impl_PyErr_Occurred >+ 'PyErr_Occurred()') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,647 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=50)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 7: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 8: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 9: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 10: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 11: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 12: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 13: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- >-Trace 14: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,21 +1,40 @@ > In function 'handle_SET_ITEM_macro': >-cc1: warning: memory leak: ob_refcnt of PyLongObject is 1 too high >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: PyLongObject was allocated at: items[2] = PyLong_FromLong(3000); >-cc1: note: was expecting final owned ob_refcnt of PyLongObject to be 1 due to object being referenced by: ob_item array for PyListObject[2] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:33:nn: note: when PyList_New() succeeds at: list = PyList_New(3); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:34:nn: note: taking False path at: if (!list) { >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39:nn: note: reaching: items[0] = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39:nn: note: when PyLong_FromLong() succeeds at: items[0] = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:40:nn: note: taking False path at: if (!items[0]) { >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44:nn: note: reaching: items[1] = PyLong_FromLong(2000); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:44:nn: note: when PyLong_FromLong() succeeds at: items[1] = PyLong_FromLong(2000); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:45:nn: note: taking False path at: if (!items[1]) { >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: reaching: items[2] = PyLong_FromLong(3000); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: when PyLong_FromLong() succeeds at: items[2] = PyLong_FromLong(3000); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:51:nn: note: taking False path at: if (!items[2]) { >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:64:nn: note: reaching: PyList_SET_ITEM(list, 0, items[0]); >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:66:nn: note: PyLongObject is now referenced by 1 non-stack value(s): ob_item array for PyListObject[2] >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:71:nn: note: ob_refcnt is now refs: 2 owned >-cc1: note: returning >-tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:24:nn: note: graphical error report for function 'handle_SET_ITEM_macro' written out to 'tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c.handle_SET_ITEM_macro-refcount-errors.html' >+tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,61 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:26 as non-NULL' >- 'when PyDict_GetItemString() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=35), region=RegionOnHeap('borrowed reference returned by PyDict_GetItemString()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=35))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyDict_GetItemString()', gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=35)) from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=35), region=Region('PyTypeObject for borrowed reference returned by PyDict_GetItemString()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:26 as non-NULL' >- 'PyDict_GetItemString does not find string' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:30 >- >-Trace 2: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyDict_GetItemString with NULL as argument 1 (some_dict.0) at tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,13 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: warning: future use-after-free: ob_refcnt of return value is 1 too low >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: return value was allocated at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:26 as non-NULL at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: when PyDict_GetItemString() succeeds at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: ob_refcnt is now refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: returning at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: warning: returning (PyObject*)NULL without setting an exception >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:26 as non-NULL at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: PyDict_GetItemString does not find string at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: note: returning at: return PyDict_GetItemString(some_dict, "item"); >-tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:30:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,43 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_Parse() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c:44 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c:31 >- >-Trace 1: >- Transitions: >- 'when PyArg_Parse() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c:37 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1140, in impl_PyArg_Parse >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,731 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() succeeds' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:28 >- >-Trace 2: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 3: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 4: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 5: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 6: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 7: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 8: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 9: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48 >- >-Trace 10: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- >-Trace 11: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- >-Trace 12: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- >-Trace 13: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43 >- >-Trace 14: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- >-Trace 15: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 >- >-Trace 16: >- Transitions: >- 'when PyDict_New() fails' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=65), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:65 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 >ine 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_GetItemString/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_GetItemString/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_GetItemString/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_GetItemString/correct/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_GetItemString/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_GetItemString/incorrect/input.c:35:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_New/correct: OK >tests/cpychecker/refcounts/PyDict_SetItem/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_SetItem/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_S--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,54 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1615, in impl_PyDict_SetItem >+ v_dp, v_key, v_item) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,45 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyMem_Malloc() succeeds' >- 'taking False path' >- 'calling PyMem_Free on PyMem_Malloc allocated at tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:31' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c', line=41), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:41 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:30 >- >-Trace 1: >- Transitions: >- 'when PyMem_Malloc() fails' >- 'taking True path' >- 'PyErr_NoMemory() returns NULL, raising MemoryError' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:41:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >lf._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c: In function 'handle_SET_ITEM_macro': > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple/input.c:39:16: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_Size/unknown-size: OK >tests/cpychecker/refcounts/PyMapping_Size/basic: OK >tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c: In function 'test': > tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free/input.c:41:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libc--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,43 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=32), region=RegionOnHeap('object from arg "O"', gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('object from arg "O"', gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=32)) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:32 >- r->ob_refcnt: (Py_ssize_t)val [-0x7fffffffffffffff <= val <= 0x7fffffffffffffff] from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:42 >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyArg_ParseTuple() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/absinterp/write-through-global-ptr-unchecked: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/absinterp/write-through-global-ptr-unchecked/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/absinterp/write-through-global-ptr-unchecked/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c >Stdout: >Stderr: > tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c: In function 'test_write_through_global_without_check': > tests/cpychecker/absinterp/write-through-global-ptr-unchecked/input.c:35:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/fileptr-missing-error-check: OK >tests/cpychecker/refcounts/GIL/correct: OK >tests/cpychecker/refcounts/PyArg_Parse/correct_simple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_Parse/correct_simple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_Parse/correct_simple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c: In function 'test': > tests/cpychecker/refcounts/PyArg_Parse/correct_simple/input.c:37:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1140, in impl_PyArg_Parse > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success = self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,570 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() succeeds' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:28 >- >-Trace 2: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 3: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 4: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 5: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 6: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 7: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 8: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 9: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() succeeds' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- >-Trace 10: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'when PyLong_FromLong() fails' >- error: NullPtrArgument() >- error: calling PyDict_SetItem with NULL as argument 3 (value) at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- >-Trace 11: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'when PyLong_FromLong() succeeds' >- error: NullPtrArgument() >- error: calling PyDict_SetItem with NULL as argument 2 (key) at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 >- >-Trace 12: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'when PyLong_FromLong() fails' >- error: NullPtrArgument() >- error: calling PyDict_SetItem with NULL as argument 2 (key) at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 >- >-Trace 13: >- Transitions: >- 'when PyDict_New() fails' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=63), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:63 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 >etItem/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:48:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1615, in impl_PyDict_SetItem > v_dp, v_key, v_item) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_SetItem/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_SetItem/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_SetItem/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > in-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c: In function 'test': > tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast/input.c:36:13: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1722, in impl_PyErr_Occurred > 'PyErr_Occurred()') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyFloat_FromDouble/simple: OK >tests/cpychecker/refcounts/PyGILState_Ensure/correct: OK >tests/cpychecker/refcounts/PyInt_AsLong/correct_PyIntObject: OK >tests/cpychecker/refcounts/PyInt_AsLong/correct_cast: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c: In function 'test': > tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:49:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/B--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,17 +1,50 @@ > In function 'test': >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:nn: warning: calling PyDict_SetItem with NULL as argument 3 (value) at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33:nn: note: when PyDict_New() succeeds at: dict = PyDict_New(); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:34:nn: note: taking False path at: if (!dict) { >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38:nn: note: reaching: key = PyLong_FromLong(500); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38:nn: note: when PyLong_FromLong() succeeds at: key = PyLong_FromLong(500); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39:nn: note: when PyLong_FromLong() fails at: value = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:nn: note: PyDict_SetItem() invokes Py_INCREF() on the pointer, thus accessing (NULL)->ob_refcnt >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:nn: warning: calling PyDict_SetItem with NULL as argument 2 (key) at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45 >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33:nn: note: when PyDict_New() succeeds at: dict = PyDict_New(); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:34:nn: note: taking False path at: if (!dict) { >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38:nn: note: reaching: key = PyLong_FromLong(500); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38:nn: note: when PyLong_FromLong() fails at: key = PyLong_FromLong(500); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39:nn: note: when PyLong_FromLong() succeeds at: value = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:nn: note: PyDict_SetItem() invokes Py_TYPE() on the pointer via the PyString_CheckExact() macro, thus accessing (NULL)->ob_type >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:nn: note: found 1 similar trace(s) to this >-tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:28:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:45:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1615, in impl_PyDict_SetItem >+ v_dp, v_key, v_item) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,99 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyInt_AsLong() succeeds' >- 'when considering range: -0x8000000000000000 <= value <= -2' >- 'taking False path' >- '__dump((long int)val [-0x8000000000000000 <= val <= -2] from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:34)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=49), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:49 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:31 >- >-Trace 1: >- Transitions: >- 'when PyInt_AsLong() succeeds' >- 'when considering value == (long int)-1 from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:34' >- 'taking True path' >- 'PyErr_Occurred()' >- 'taking False path' >- '__dump((long int)-1 from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:34)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=49), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:49 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:31 >- >-Trace 2: >- Transitions: >- 'when PyInt_AsLong() succeeds' >- 'when considering range: 0 <= value <= 0x7fffffffffffffff' >- 'taking False path' >- '__dump((long int)val [0 <= val <= 0x7fffffffffffffff] from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:34)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=49), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:49 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:31 >- >-Trace 3: >- Transitions: >- 'when PyInt_AsLong() fails' >- 'taking True path' >- 'PyErr_Occurred()' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyInt_AsLong/correct_cast/input.c:49:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyMem_Free on NULL' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c:33 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,88 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when treating unknown char * from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=52), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=52))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=52)) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=52), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:36 >- >-Trace 1: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when treating unknown char * from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 as non-NULL' >- 'when PyString_FromString() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=52), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 >- >-Trace 2: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when treating unknown char * from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (D.nnnnn) at tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:52 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:36 >- >-Trace 3: >- Transitions: >- 'when PyArg_ParseTuple() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=41), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:41 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:39 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,278 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() succeeds' >- 'taking False path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:42 >- >-Trace 2: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:42 >- >-Trace 3: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:42 >- >-Trace 4: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:42 >- >-Trace 5: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- >-Trace 6: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 >- >-Trace 7: >- Transitions: >- 'when PyDict_New() fails' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=56), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:56 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,48 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1632, in impl_PyDict_SetItemString >+ v_dp, v_key, v_item) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,277 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42 >- >-Trace 2: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42 >- >-Trace 3: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42 >- >-Trace 4: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyDict_SetItemString() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42 >- >-Trace 5: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- >-Trace 6: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 >- >-Trace 7: >- Transitions: >- 'when PyDict_New() fails' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=57), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:57 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1615, in impl_PyDict_SetItem > v_dp, v_key, v_item) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_SetItemString/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_SetItemString/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_SetItemString/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:42:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1632, in impl_PyDict_SetItemString > v_dp, v_key, v_item) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_SetItemString/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File -building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c: In function 'test': > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O/input.c:32:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success = self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c: In function 'test': > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang/input.c:39:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success = self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c: In function 'correct_usage_of_converter': > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c:27:10: error--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,17 +1,48 @@ > In function 'test': >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:52:nn: warning: memory leak: ob_refcnt of '*value' is 1 too high >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37:nn: note: '*value' was allocated at: value = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:52:nn: note: was expecting final owned ob_refcnt of '*value' to be 0 since nothing references it but final ob_refcnt is refs: 1 owned, 1 borrowed >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32:nn: note: when PyDict_New() succeeds at: dict = PyDict_New(); >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:33:nn: note: taking False path at: if (!dict) { >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37:nn: note: reaching: value = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37:nn: note: when PyLong_FromLong() succeeds at: value = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:38:nn: note: taking False path at: if (!value) { >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42:nn: note: reaching: if (-1 == PyDict_SetItemString(dict, "key", value)) { >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42:nn: note: when PyDict_SetItemString() succeeds at: if (-1 == PyDict_SetItemString(dict, "key", value)) { >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42:nn: note: ob_refcnt is now refs: 1 owned, 1 borrowed >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42:nn: note: taking False path at: if (-1 == PyDict_SetItemString(dict, "key", value)) { >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:52:nn: note: reaching: return dict; >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:52:nn: note: returning >-tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:28:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1632, in impl_PyDict_SetItemString >+ v_dp, v_key, v_item) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,43 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c:33 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c', line=24), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c', line=24), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c:25 >- >-Trace 1: >- Transitions: >- 'when PyArg_ParseTuple() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c:30 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c', line=24), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c', line=24), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c:27 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'correct_usage_of_converter': >+tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter/input.c:27:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,43 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c:44 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c:31 >- >-Trace 1: >- Transitions: >- 'when PyArg_ParseTuple() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c:37 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,53 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_ParseTupleAndKeywords() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=33), region=RegionOnHeap('object from arg "O"', gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('object from arg "O"', gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=33)) from tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:33 >- r->ob_refcnt: (Py_ssize_t)val [-0x7fffffffffffffff <= val <= 0x7fffffffffffffff] from tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:44 >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- region for gcc.ParmDecl('kwargs') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('kwargs')") >- str(): region for gcc.ParmDecl('kwargs') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('kwargs')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyArg_ParseTupleAndKeywords() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=36), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- region for gcc.ParmDecl('kwargs') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('kwargs')") >- str(): region for gcc.ParmDecl('kwargs') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('kwargs')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1186, in impl_PyArg_ParseTupleAndKeywords >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success = self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c: In function 'test': > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple/input.c:37:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success = self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c: In function 'test': > tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O/input.c:33:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_jso--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,11 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_Clear()' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_Clear/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PyErr_Clear/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_Clear/correct/input.c:29 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyErr_Clear/correct/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,264 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() succeeds' >- 'taking False path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:42 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:42 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:42 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:42 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:36 >- >-Trace 7: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/correct/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/correct/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,42 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyList_Append/correct/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2269, in impl_PyList_Append >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,253 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_UnpackTuple() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- >-Trace 1: >- Transitions: >- 'when PyArg_UnpackTuple() successfully unpacks 1 argument(s)' >- 'taking False path' >- 'when PyTuple_Pack() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37)) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 1', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 1')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:28 >- >-Trace 2: >- Transitions: >- 'when PyArg_UnpackTuple() successfully unpacks 1 argument(s)' >- 'taking False path' >- 'when PyTuple_Pack() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 1', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 1')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- >-Trace 3: >- Transitions: >- 'when PyArg_UnpackTuple() successfully unpacks 2 argument(s)' >- 'taking False path' >- 'when PyTuple_Pack() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37)) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 1', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 1')) >- argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 2', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 2')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:28 >- >-Trace 4: >- Transitions: >- 'when PyArg_UnpackTuple() successfully unpacks 2 argument(s)' >- 'taking False path' >- 'when PyTuple_Pack() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 1', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 1')) >- argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 2', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 2')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- >-Trace 5: >- Transitions: >- 'when PyArg_UnpackTuple() successfully unpacks 3 argument(s)' >- 'taking False path' >- 'when PyTuple_Pack() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37)) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 1', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 1')) >- argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 2', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 2')) >- argument 3 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 3', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 3 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 3')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:28 >- >-Trace 6: >- Transitions: >- 'when PyArg_UnpackTuple() successfully unpacks 3 argument(s)' >- 'taking False path' >- 'when PyTuple_Pack() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')): >- repr(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- str(): RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: None >- argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 1', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 1 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 1')) >- argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 2', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 2 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 2')) >- argument 3 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33: >- repr(): RegionOnHeap('argument 3', gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33)) >- str(): argument 3 allocated at tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c', line=33), region=Region('PyTypeObject for argument 3')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:37 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1235, in impl_PyArg_UnpackTuple >+ s_failure = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- 'PyErr_Format()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_Format/correct/input.c', line=36), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_Format/correct/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_Format/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_Format/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyErr_Format/correct/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >"/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1632, in impl_PyDict_SetItemString > v_dp, v_key, v_item) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyDict_Size/simple: OK >tests/cpychecker/refcounts/PyErr_Clear/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_Clear/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_Clear/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_Clear/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_Clear/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_Clear/correct/input.c:30:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyErr_Format/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_Format/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_Format/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_Format/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_Format/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_Format/correct/input.c:34:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitio--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,263 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=36)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36 >- >-Trace 7: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,18 +1,42 @@ > In function 'test': >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:53:nn: warning: memory leak: ob_refcnt of '*item' is 1 too high >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36:nn: note: '*item' was allocated at: item = PyLong_FromLong(42); >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:53:nn: note: was expecting final owned ob_refcnt of '*item' to be 1 due to object being referenced by: PyListObject.ob_item[0] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:32:nn: note: when PyList_New() succeeds at: list = PyList_New(0); >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:33:nn: note: taking False path at: if (!list) { >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36:nn: note: reaching: item = PyLong_FromLong(42); >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36:nn: note: when PyLong_FromLong() succeeds at: item = PyLong_FromLong(42); >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:36:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:37:nn: note: taking False path at: if (!item) { >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:nn: note: reaching: if (-1 == PyList_Append(list, item)) { >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:nn: note: when PyList_Append() succeeds at: if (-1 == PyList_Append(list, item)) { >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:nn: note: ob_refcnt is now refs: 2 owned >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:nn: note: '*item' is now referenced by 1 non-stack value(s): PyListObject.ob_item[0] >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:nn: note: taking False path at: if (-1 == PyList_Append(list, item)) { >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:53:nn: note: reaching: return list; >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:53:nn: note: returning >-tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:28:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyList_Append/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2269, in impl_PyList_Append >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >UILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyInt_FromLong/correct_large_int: OK >tests/cpychecker/refcounts/PyInt_FromLong/correct_small_int: OK >tests/cpychecker/refcounts/PyIter_Next/simple: OK >tests/cpychecker/refcounts/PyList_Append/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_Append/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_Append/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_Append/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_Append/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyList_Append/correct/input.c:42:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2269, in impl_PyList_Append > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_Append/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_Append/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_Append/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_Append/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_Append/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyList_Append/incorrect/input.c:42:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,74 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when PyObject_CallMethod() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30), region=RegionOnHeap('new ref from call to PyObject_CallMethod', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_CallMethod', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30)) from tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30), region=Region('PyTypeObject for new ref from call to PyObject_CallMethod')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when PyObject_CallMethod() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >- >-Trace 2: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'when PyObject_CallMethod() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30 >pychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c: In function 'test': > tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL/input.c:33:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyModule_AddObject/incorrect-with-cast: OK >tests/cpychecker/refcounts/PyObject_CallFunction/correct: OK >tests/cpychecker/refcounts/PyObject_CallFunctionObjArgs/correct: OK >tests/cpychecker/refcounts/PyObject_CallFunctionObjArgs/incorrect: OK >tests/cpychecker/refcounts/PyObject_CallMethod/correct: OK >tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c: In function 'test': > tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-p--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,214 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= n <= 0' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:30 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() succeeds' >- 'taking False path' >- 'when PyList_Append() succeeds' >- 'taking False path' >- 'when considering n == (int)1 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:29' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41: >- repr(): RegionOnHeap('new ref from (unknown) item_ctor', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41)) >- str(): new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41), region=Region('PyTypeObject for new ref from (unknown) item_ctor')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:30 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=50), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:50 >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41: >- repr(): RegionOnHeap('new ref from (unknown) item_ctor', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41)) >- str(): new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41), region=Region('PyTypeObject for new ref from (unknown) item_ctor')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=50), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:50 >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41: >- repr(): RegionOnHeap('new ref from (unknown) item_ctor', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41)) >- str(): new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=50), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:50 >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41: >- repr(): RegionOnHeap('new ref from (unknown) item_ctor', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41)) >- str(): new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41), region=Region('PyTypeObject for new ref from (unknown) item_ctor')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=50), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:50 >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41: >- repr(): RegionOnHeap('new ref from (unknown) item_ctor', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=41)) >- str(): new ref from (unknown) item_ctor allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=44), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:44 >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- >-Trace 7: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= n <= 0x7fffffff' >- 'taking True path' >- 'when item_ctor() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=44), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:44 >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41 >- >-Trace 8: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c', line=36), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:36 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,24 +1,48 @@ > In function 'test': >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:59:nn: warning: memory leak: ob_refcnt of '*item' is 1 too high >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41:nn: note: '*item' was allocated at: item = item_ctor(); >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:59:nn: note: was expecting final owned ob_refcnt of '*item' to be 1 due to object being referenced by: PyListObject.ob_item[0] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:34:nn: note: when PyList_New() succeeds at: list = PyList_New(0); >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:35:nn: note: taking False path at: if (!list) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:38:nn: note: reaching: for (i = 0; i < n; i++) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:38:nn: note: when considering range: 1 <= n <= 0x7fffffff at: for (i = 0; i < n; i++) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:38:nn: note: taking True path at: for (i = 0; i < n; i++) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41:nn: note: reaching: item = item_ctor(); >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41:nn: note: when item_ctor() succeeds at: item = item_ctor(); >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:41:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:42:nn: note: taking False path at: if (!item) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:nn: note: reaching: if (PyList_Append(list, item)) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:nn: note: when PyList_Append() succeeds at: if (PyList_Append(list, item)) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:nn: note: ob_refcnt is now refs: 2 owned >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:nn: note: '*item' is now referenced by 1 non-stack value(s): PyListObject.ob_item[0] >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:nn: note: taking False path at: if (PyList_Append(list, item)) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:38:nn: note: reaching: for (i = 0; i < n; i++) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:38:nn: note: when considering n == (int)1 from tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:29 at: for (i = 0; i < n; i++) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:38:nn: note: taking False path at: for (i = 0; i < n; i++) { >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:59:nn: note: reaching: return list; >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:59:nn: note: returning >-tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:30:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2269, in impl_PyList_Append >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c', line=30), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c', line=30), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c:29 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >n=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1186, in impl_PyArg_ParseTupleAndKeywords > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success = self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_UnpackTuple/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyArg_UnpackTuple/correct/input.c:33:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1235, in impl_PyArg_UnpackTuple > s_failure = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyArg_UnpackTuple/wrong-number-of-varargs: OK >tests/cpychecker/refcounts/PyBool_FromLong/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyBool_FromLong/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyBool_FromLong/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyBool_FromLong/correct/input.c:30:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > --- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,77 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'returning -1 from PyList_Append() due to NULL item' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=37), value=-1) >- str(): (int)-1 from tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:37 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'returning -1 from PyList_Append() due to NULL item' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:32' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=37), value=-1) >- str(): (int)-1 from tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:32: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=32)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:37 >- >-Trace 2: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=34), value=42) >- str(): (int)42 from tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:32 >transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2269, in impl_PyList_Append > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_Append/incorrect-loop: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_Append/incorrect-loop/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_Append/incorrect-loop/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c: In function 'test': > tests/cpychecker/refcounts/PyList_Append/incorrect-loop/input.c:47:13: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2269, in impl_PyList_Append > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_Append/null-newitem: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyList_Append/null-newitem/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyList_Append/null-newitem/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c: In function 'test': > tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:39:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyList_Append/null-newitem/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,163 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() succeeds' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39), region=RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39)) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39), region=Region('PyTypeObject for new ref from call to PyObject_CallMethodObjArgs')) >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=34)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:33 >- >-Trace 1: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() succeeds' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39), region=RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39)) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39), region=Region('PyTypeObject for new ref from call to PyObject_CallMethodObjArgs')) >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=34)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:33 >- >-Trace 2: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() fails' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:39 >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=34)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:39 >- >-Trace 3: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() fails' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:39 >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=34)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:39 >- >-Trace 4: >- Transitions: >- 'when PyString_FromString() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:37 >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c', line=32), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:40:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,10 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_SetString()' >- 'calling PyErr_PrintEx()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_PrintEx/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_PrintEx/input.c:37 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_PrintEx/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,8 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:37:nn: warning: returning (PyObject*)NULL without setting an exception >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:30:nn: note: calling PyErr_SetString() at: PyErr_SetString(PyExc_RuntimeError, >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:30:nn: note: thread-local exception state now has value: unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:34:nn: note: calling PyErr_PrintEx() at: PyErr_PrintEx(1); >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:34:nn: note: thread-local exception state now has value: (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_PrintEx/input.c:34 >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:37:nn: note: returning at: return NULL; >-tests/cpychecker/refcounts/PyErr_PrintEx/input.c:28:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyErr_PrintEx/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyErr_PrintEx/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,163 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() succeeds' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43), region=RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43)) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43), region=Region('PyTypeObject for new ref from call to PyObject_CallMethodObjArgs')) >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=35)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=35), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:34 >- >-Trace 1: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() succeeds' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43), region=RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_CallMethodObjArgs', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43)) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43), region=Region('PyTypeObject for new ref from call to PyObject_CallMethodObjArgs')) >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=35)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:34 >- >-Trace 2: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() fails' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43 >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=35)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=35), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43 >- >-Trace 3: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PyObject_CallMethodObjArgs() fails' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=43), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43 >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=35)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43 >- >-Trace 4: >- Transitions: >- 'when PyString_FromString() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:38 >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- region for gcc.ParmDecl('b') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('b')") >- str(): region for gcc.ParmDecl('b') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c', line=33), region=Region("region-for-type-of-arg-gcc.ParmDecl('b')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:35 >ython2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct/input.c:40:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:12: warning: argument 3 had type char[13] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:12: warning: argument 4 had type char[4] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:12: warning: argument 5 had type char[3] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:12: warning: argument 6 had type char[3] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:12: warning: argument 7 had type char[4] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:12: warning: arguments to PyObject_CallMethodObjArgs were not NULL-terminated > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:46:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/bui--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -5,3 +5,40 @@ > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:nn: warning: argument 6 had type char[3] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:nn: warning: argument 7 had type char[4] * but was expecting a PyObject* (or subclass) > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:43:nn: warning: arguments to PyObject_CallMethodObjArgs were not NULL-terminated >+tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect/input.c:46:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,19 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_SetFromErrno()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c:29 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >ns() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyErr_NewException/basic: OK >tests/cpychecker/refcounts/PyErr_NoMemory/correct: OK >tests/cpychecker/refcounts/PyErr_PrintEx: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_PrintEx/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_PrintEx/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_PrintEx/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_PrintEx/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_PrintEx/input.c:30:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyErr_SetFromErrno/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyErr_SetFromErrno/correct/input.c:29:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576,--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,203 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() succeeds (Py_DECREF() without deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=Region('PyTypeObject for result of PyString_Concat')) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:28 >- >-Trace 1: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() succeeds (Py_DECREF() with deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=Region('PyTypeObject for result of PyString_Concat')) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:28 >- >-Trace 2: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() fails (Py_DECREF() without deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- >-Trace 3: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() fails (Py_DECREF() with deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- >-Trace 4: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when PyString_Concat() cleans up due to NULL right-hand side (Py_DECREF() without deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- >-Trace 5: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when PyString_Concat() cleans up due to NULL right-hand side (Py_DECREF() with deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- >-Trace 6: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (msg1) at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:28 >- >-Trace 7: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() does nothing due to NULL *lhs' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- >-Trace 8: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when PyString_Concat() does nothing due to NULL *lhs' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- >-Trace 9: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (msg1) at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- >-Trace 10: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (msg0) at tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:28 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,13 +1,38 @@ > In function 'test': >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:34:nn: warning: memory leak: ob_refcnt of PyStringObject is 1 too high >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32:nn: note: PyStringObject was allocated at: PyString_Concat(&result, PyString_FromString(msg1)); >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:34:nn: note: was expecting final owned ob_refcnt of PyStringObject to be 0 since nothing references it but final ob_refcnt is refs: 1 owned >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29:nn: note: when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL at: PyObject *result = PyString_FromString(msg0); >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29:nn: note: when PyString_FromString() succeeds at: PyObject *result = PyString_FromString(msg0); >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32:nn: note: when treating unknown const char * from tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:27 as non-NULL at: PyString_Concat(&result, PyString_FromString(msg1)); >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32:nn: note: when PyString_FromString() succeeds at: PyString_Concat(&result, PyString_FromString(msg1)); >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:32:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:34:nn: note: when PyString_Concat() succeeds (Py_DECREF() without deallocation on *LHS) at: return result; >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:34:nn: note: returning at: return result; >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:34:nn: note: found 4 similar trace(s) to this >-tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:28:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3385, in impl_PyString_FromString >+ 'PyString_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,110 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyTuple_SetItem() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27)) from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:32: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=32)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:32 >- >-Trace 2: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=27)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:32 >- >-Trace 3: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:29 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:27 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_SetItem': >+tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,650 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyTuple_SetItem() succeeds' >- 'when PyTuple_SetItem() succeeds' >- 'when PyTuple_SetItem() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=50)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 2: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 3: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 4: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 5: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 6: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 7: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 8: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:50 >- >-Trace 9: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- >-Trace 10: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- >-Trace 11: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- >-Trace 12: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:44 >- >-Trace 13: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- >-Trace 14: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:33 > in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_SetItem/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_SetItem/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_SetItem/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c: In function 'handle_SetItem': > tests/cpychecker/refcounts/PyTuple_SetItem/correct/input.c:34:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c: In function 'handle_SetItem': > tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39:16: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpy--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_SetItem': >+tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,7 +0,0 @@ >-Trace 0: >- Transitions: >- 'PyErr_NoMemory() returns NULL, raising MemoryError' >- 'taking True path' >- 'returning' >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/__builtin_expect/input.c:56 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/refcounts/__builtin_expect/input.c:62:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,650 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyTuple_SetItem() succeeds' >- 'when PyTuple_SetItem() succeeds' >- 'when PyTuple_SetItem() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=50)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 2: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 3: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 4: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 5: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 6: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 7: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 8: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50 >- >-Trace 9: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- >-Trace 10: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- >-Trace 11: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- >-Trace 12: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44 >- >-Trace 13: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- >-Trace 14: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,24 +1,40 @@ > In function 'handle_SetItem': >-cc1: warning: memory leak: ob_refcnt of PyLongObject is 1 too high >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50:nn: note: PyLongObject was allocated at: items[2] = PyLong_FromLong(3000); >-cc1: note: was expecting final owned ob_refcnt of PyLongObject to be 1 due to object being referenced by: PyTupleObject.ob_item[2] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:33:nn: note: when PyTuple_New() succeeds at: tuple = PyTuple_New(3); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:34:nn: note: taking False path at: if (!tuple) { >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39:nn: note: reaching: items[0] = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39:nn: note: when PyLong_FromLong() succeeds at: items[0] = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:40:nn: note: taking False path at: if (!items[0]) { >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44:nn: note: reaching: items[1] = PyLong_FromLong(2000); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:44:nn: note: when PyLong_FromLong() succeeds at: items[1] = PyLong_FromLong(2000); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:45:nn: note: taking False path at: if (!items[1]) { >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50:nn: note: reaching: items[2] = PyLong_FromLong(3000); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50:nn: note: when PyLong_FromLong() succeeds at: items[2] = PyLong_FromLong(3000); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:50:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:51:nn: note: taking False path at: if (!items[2]) { >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:64:nn: note: reaching: PyTuple_SetItem(tuple, 0, items[0]); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:64:nn: note: when PyTuple_SetItem() succeeds at: PyTuple_SetItem(tuple, 0, items[0]); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:65:nn: note: when PyTuple_SetItem() succeeds at: PyTuple_SetItem(tuple, 1, items[1]); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:66:nn: note: when PyTuple_SetItem() succeeds at: PyTuple_SetItem(tuple, 2, items[2]); >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:66:nn: note: PyLongObject is now referenced by 1 non-stack value(s): PyTupleObject.ob_item[2] >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:71:nn: note: ob_refcnt is now refs: 2 owned >-cc1: note: returning >-tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:24:nn: note: graphical error report for function 'handle_SetItem' written out to 'tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c.handle_SetItem-refcount-errors.html' >+tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,43 +0,0 @@ >-Trace 0: >- Transitions: >- 'when foo() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=41), region=RegionOnHeap('borrowed reference returned by foo()', gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=41))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by foo()', gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=41)) from tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c:41 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=41), region=Region('PyTypeObject for borrowed reference returned by foo()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c:40 >- >-Trace 1: >- Transitions: >- 'when foo() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=41), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c:41 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c:41 >lddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyObject_CallObject/correct: OK >tests/cpychecker/refcounts/PyObject_GenericGetAttr/basic: OK >tests/cpychecker/refcounts/__builtin_expect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/__builtin_expect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/__builtin_expect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/__builtin_expect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/__builtin_expect/input.c: In function 'test': > tests/cpychecker/refcounts/__builtin_expect/input.c:62:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-marking: OK >tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c:42:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997,--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,322 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() succeeds (Py_DECREF() without deallocation on *LHS) (Py_DECREF() without deallocation on RHS)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=Region('PyTypeObject for result of PyString_Concat')) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:28 >- >-Trace 1: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() succeeds (Py_DECREF() without deallocation on *LHS) (Py_DECREF() with deallocation on RHS)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=Region('PyTypeObject for result of PyString_Concat')) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:28 >- >-Trace 2: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() succeeds (Py_DECREF() with deallocation on *LHS) (Py_DECREF() without deallocation on RHS)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=Region('PyTypeObject for result of PyString_Concat')) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:28 >- >-Trace 3: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() succeeds (Py_DECREF() with deallocation on *LHS) (Py_DECREF() with deallocation on RHS)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('result of PyString_Concat', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=Region('PyTypeObject for result of PyString_Concat')) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:28 >- >-Trace 4: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() fails (Py_DECREF() without deallocation on *LHS) (Py_DECREF() without deallocation on RHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 5: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() fails (Py_DECREF() without deallocation on *LHS) (Py_DECREF() with deallocation on RHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 6: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() fails (Py_DECREF() with deallocation on *LHS) (Py_DECREF() without deallocation on RHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 7: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() fails (Py_DECREF() with deallocation on *LHS) (Py_DECREF() with deallocation on RHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 8: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when PyString_Concat() cleans up due to NULL right-hand side (Py_DECREF() without deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 9: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when PyString_Concat() cleans up due to NULL right-hand side (Py_DECREF() with deallocation on *LHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 10: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (msg1) at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:28 >- >-Trace 11: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() does nothing due to NULL *lhs (Py_DECREF() without deallocation on RHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- >-Trace 12: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() succeeds' >- 'when PyString_Concat() does nothing due to NULL *lhs (Py_DECREF() with deallocation on RHS)' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- >-Trace 13: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when PyString_Concat() does nothing due to NULL *lhs' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- >-Trace 14: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as non-NULL' >- 'when PyString_FromString() fails' >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (msg1) at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:30 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- >-Trace 15: >- Transitions: >- 'when treating unknown const char * from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:27 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyString_FromString with NULL as argument 1 (msg0) at tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:28 >.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyList_Append/ticket-19: OK >tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c: In function 'test': > tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs/input.c:29:24: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3385, in impl_PyString_FromString > 'PyString_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyString_Concat/null-lhs: OK >tests/cpychecker/refcounts/PyString_Concat/null-rhs: OK >tests/cpychecker/refcounts/PyString_ConcatAndDel/basic: OK >tests/cpychecker/refcounts/PyString_ConcatAndDel/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29:24: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-pyth--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyString_ConcatAndDel/correct/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3385, in impl_PyString_FromString >+ 'PyString_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,45 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyObject_HasAttrString() returns 1 (true)' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyObject_HasAttrString() returns 0 (false)' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=30), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c:28 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,74 +0,0 @@ >-Trace 0: >- Transitions: >- 'taking False path' >- 'when considering range: -0x80000000 <= value <= -1' >- 'taking True path' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35)) from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:35 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'taking False path' >- 'when considering value == (int)0 from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:35' >- 'taking False path' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35)) from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:35 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:30 >- >-Trace 2: >- Transitions: >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35)) from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:35 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=35), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:30 >checker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c: In function 'handle_SetItem': > tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple/input.c:39:16: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_Size/incorrect: OK >tests/cpychecker/refcounts/PyTuple_Size/ticket-24: OK >tests/cpychecker/refcounts/PyType_IsSubtype/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyType_IsSubtype/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyType_IsSubtype/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:35:28: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.Resu--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyType_IsSubtype/correct/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,34 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: -0x80000000 <= value <= 41' >- 'taking False path' >- 'calling PyErr_SetString()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c', line=44), value=-1) >- str(): (int)-1 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:44 >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >- >-Trace 1: >- Transitions: >- 'when considering value == (int)42 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:38' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c', line=41), value=0) >- str(): (int)0 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:41 >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:39 >- >-Trace 2: >- Transitions: >- 'when considering range: 43 <= value <= 0x7fffffff' >- 'taking False path' >- 'calling PyErr_SetString()' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c', line=44), value=-1) >- str(): (int)-1 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:44 >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:43:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,68 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyObject_IsTrue() returns 1 (true)' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31)) from tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:31 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyObject_IsTrue() returns 0 (false)' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31)) from tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:31 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:28 >- >-Trace 2: >- Transitions: >- 'when PyObject_IsTrue() returns -1 (failure)' >- 'PyBool_FromLong() returns' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31), region=RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31))) >- str(): (struct PyObject *)&RegionOnHeap('PyBool_FromLong', gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31)) from tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:31 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=31), region=Region('PyTypeObject for PyBool_FromLong')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:29 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,34 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:31:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyObject_GenericSetAttr/basic: OK >tests/cpychecker/refcounts/PyObject_GetAttr/correct: OK >tests/cpychecker/refcounts/PyObject_GetAttr/incorrect: OK >tests/cpychecker/refcounts/PyObject_GetAttrString/correct: OK >tests/cpychecker/refcounts/PyObject_GetAttrString/incorrect: OK >tests/cpychecker/refcounts/PyObject_GetItem/correct: OK >tests/cpychecker/refcounts/PyObject_GetItem/incorrect: OK >tests/cpychecker/refcounts/PyObject_HasAttrString/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyObject_HasAttrString/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyObject_HasAttrString/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyObject_HasAttrString/correct/input.c:30:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyObject_HasAttrString/incorrect: OK >tests/cpychecker/refcounts/PyObject_IsTrue/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyObject_IsTrue/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyObject_IsTrue/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyObject_IsTrue/correct/input.c:31:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,43 +0,0 @@ >-Trace 0: >- Transitions: >- 'when considering range: -0x80000000 <= value <= -1' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c', line=50), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c:50 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c:43 >- >-Trace 1: >- Transitions: >- 'when considering range: 0 <= value <= 0x7fffffff' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c', line=52), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c:52 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c:40 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c:52:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) > in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/returns-borrowed-ref/incorrect-marking: OK >tests/cpychecker/refcounts/attributes/returns-borrowed-ref/incorrect-usage: OK >tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking/input.c:43:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage/input.c:52:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,44 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:26 as non-NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyWeakref_GetObject()', gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyWeakref_GetObject()', gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyWeakref_GetObject()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:26 as NULL' >- 'PyWeakref_GetObject() fails due to NULL argument' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=41), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:41 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,44 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:26 as non-NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyWeakref_GetObject()', gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyWeakref_GetObject()', gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=32)) from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyWeakref_GetObject()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:26 as NULL' >- 'PyWeakref_GetObject() fails due to NULL argument' >- 'taking False path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32 >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,55 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyStructSequence_New() succeeds' >- 'taking False path' >- 'when PyInt_FromLong() succeeds' >- 'when PyInt_FromLong() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=50), region=RegionOnHeap('PyStructSequence_New', gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=50))) >- str(): (struct PyObject *)&RegionOnHeap('PyStructSequence_New', gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=50)) from tests/cpychecker/refcounts/PyStructSequence/correct/input.c:50 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('CoordType'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=43), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=43), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyIntObject allocated at tests/cpychecker/refcounts/PyStructSequence/correct/input.c:59: >- repr(): RegionOnHeap('PyIntObject', gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=59)) >- str(): PyIntObject allocated at tests/cpychecker/refcounts/PyStructSequence/correct/input.c:59 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=59), region=RegionForGlobal(gcc.VarDecl('PyInt_Type'))) >- PyIntObject allocated at tests/cpychecker/refcounts/PyStructSequence/correct/input.c:60: >- repr(): RegionOnHeap('PyIntObject', gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=60)) >- str(): PyIntObject allocated at tests/cpychecker/refcounts/PyStructSequence/correct/input.c:60 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=60), region=RegionForGlobal(gcc.VarDecl('PyInt_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyStructSequence/correct/input.c:44 >- >-Trace 1: >- Transitions: >- 'when PyStructSequence_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=52), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyStructSequence/correct/input.c:52 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=43), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyStructSequence/correct/input.c', line=43), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyStructSequence/correct/input.c:50 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,10 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:35:nn: warning: future use-after-free: ob_refcnt of return value is 1 too low >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32:nn: note: return value was allocated at: item = PyWeakref_GetObject(some_ref); >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:35:nn: note: was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:26 as non-NULL at: item = PyWeakref_GetObject(some_ref); >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32:nn: note: ob_refcnt is now refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:33:nn: note: taking True path at: if (item) { >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:35:nn: note: reaching: return item; >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:35:nn: note: returning >-tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:30:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyStructSequence/correct/input.c:59:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2190, in impl_PyInt_FromLong >+ 'PyInt_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,31 +0,0 @@ >-Trace 0: >- Transitions: >- 'when Py_BuildValue() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=30), region=RegionOnHeap('new ref from call to Py_BuildValue', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to Py_BuildValue', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=30)) from tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=30), region=Region('PyTypeObject for new ref from call to Py_BuildValue')) >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c:29 >- >-Trace 1: >- Transitions: >- 'when Py_BuildValue() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=30), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c:30 >- region for gcc.ParmDecl('a') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('a')") >- str(): region for gcc.ParmDecl('a') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('a')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >ltDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyUnicode_AsUTF8String/basic: OK >tests/cpychecker/refcounts/PyWeakref_GetObject/NULL: OK >tests/cpychecker/refcounts/PyWeakref_GetObject/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyWeakref_GetObject/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyWeakref_GetObject/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyWeakref_GetObject/correct/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c: In function 'test': > tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE/input.c:30:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/buil--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,146 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'PySequence_SetItem() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29)) from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=34)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'PySequence_SetItem() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29)) from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=34)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:24 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=29)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:34 >- >-Trace 4: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=31), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:31 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:29 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,44 @@ >+In function 'handle_SetItem': >+tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:49:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,6 +0,0 @@ >-Trace 0: >- Transitions: >- 'calling PyErr_SetString()' >- 'returning' >- Exception: >- unknown struct PyObject * from /usr/include/python?.?/pyerrors.h:nn >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/input.c:40:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,111 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'PySequence_SetItem() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29)) from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=34)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=29)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34 >- >-Trace 3: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=31), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:31 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29 >/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyObject_SetAttrString/ignored-lhs: OK >tests/cpychecker/refcounts/PySequence_SetItem/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PySequence_SetItem/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PySequence_SetItem/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c: In function 'handle_SetItem': > tests/cpychecker/refcounts/PySequence_SetItem/correct/input.c:49:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PySequence_SetItem/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PySequence_SetItem/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PySequence_SetItem/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c: In function 'handle_SetItem': > tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:36:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 303--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,16 +1,40 @@ > In function 'handle_SetItem': >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:50:nn: warning: memory leak: ob_refcnt of '*item' is 1 too high >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34:nn: note: '*item' was allocated at: item = PyLong_FromLong(42); >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:50:nn: note: was expecting final owned ob_refcnt of '*item' to be 0 since nothing references it but final ob_refcnt is refs: 1 owned >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:29:nn: note: when PyList_New() succeeds at: list = PyList_New(1); >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:30:nn: note: taking False path at: if (!list) { >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34:nn: note: reaching: item = PyLong_FromLong(42); >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34:nn: note: when PyLong_FromLong() succeeds at: item = PyLong_FromLong(42); >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:34:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:35:nn: note: taking False path at: if (!item) { >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:41:nn: note: reaching: rv = PySequence_SetItem(list, 0, item); >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:41:nn: note: PySequence_SetItem() succeeds at: rv = PySequence_SetItem(list, 0, item); >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:42:nn: note: taking False path at: if (rv != 0) { >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:50:nn: note: reaching: return list; >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:50:nn: note: returning >-tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:24:nn: note: graphical error report for function 'handle_SetItem' written out to 'tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c.handle_SetItem-refcount-errors.html' >+tests/cpychecker/refcounts/PySequence_SetItem/incorrect/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,111 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PySys_SetObject() succeeds' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=40), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:40 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=31), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PySys_SetObject() fails' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=40), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:40 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=31), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:37 >- >-Trace 2: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'taking False path' >- 'when PySys_SetObject() fails' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=40), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:40 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:37 >- >-Trace 3: >- Transitions: >- 'when PyString_FromString() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySys_SetObject/correct/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:31 >on-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3385, in impl_PyString_FromString > 'PyString_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyString_ConcatAndDel/null-lhs: OK >tests/cpychecker/refcounts/PyString_ConcatAndDel/null-rhs: OK >tests/cpychecker/refcounts/PyString_FromStringAndSize/correct: OK >tests/cpychecker/refcounts/PyString_Size/correct: OK >tests/cpychecker/refcounts/PyStructSequence/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyStructSequence/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyStructSequence/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyStructSequence/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyStructSequence/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyStructSequence/correct/input.c:59:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2190, in impl_PyInt_FromLong > 'PyInt_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PySys_GetObject/incorrect: OK >tests/cpychecker/refcounts/PySys_SetObject/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PySys_SetObject/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PySys_SetObject/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PySys_SetObject/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PySys_SetObject/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:39:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.p--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PySys_SetObject/correct/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,147 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PySequence_Size() succeeds' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:36 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=28)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=28), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PySequence_Size() succeeds' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:36 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=28)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:24 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PySequence_Size() fails' >- 'taking False path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=26), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:26 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=28)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=28), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:33 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PySequence_Size() fails' >- 'taking False path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=26), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:26 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=28)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:33 >- >-Trace 4: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=26), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:26 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PySequence_Size/correct/input.c:28 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,42 @@ >+In function 'handle_PySequence_Size': >+tests/cpychecker/refcounts/PySequence_Size/correct/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3215, in impl_PySequence_Size >+ stmt.loc)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2103, in mkstate_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,110 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when Py_BuildValue() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34), region=RegionOnHeap('new ref from call to Py_BuildValue', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to Py_BuildValue', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34)) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34), region=Region('PyTypeObject for new ref from call to Py_BuildValue')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=33)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when Py_BuildValue() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=33)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >- >-Trace 2: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when Py_BuildValue() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=33)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >- >-Trace 3: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'when Py_BuildValue() fails' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'test': >+tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,21 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PySequence_Size raises SystemError due to NULL as argument 1 at tests/cpychecker/refcounts/PySequence_Size/null/input.c:29' >- 'taking False path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/null/input.c', line=26), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PySequence_Size/null/input.c:26 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/null/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PySequence_Size/null/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_SystemError')) from tests/cpychecker/refcounts/PySequence_Size/null/input.c:29 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_PySequence_Size_NULL': >+tests/cpychecker/refcounts/PySequence_Size/null/input.c:29:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3207, in impl_PySequence_Size >+ t_err = self.handle_null_error(stmt, 0, v_o, rawreturnvalue=-1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 956, in handle_null_error >+ None) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >3, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PySequence_Size/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PySequence_Size/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PySequence_Size/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PySequence_Size/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PySequence_Size/correct/input.c: In function 'handle_PySequence_Size': > tests/cpychecker/refcounts/PySequence_Size/correct/input.c:33:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3215, in impl_PySequence_Size > stmt.loc)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2103, in mkstate_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PySequence_Size/null: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PySequence_Size/null/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PySequence_Size/null/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PySequence_Size/null/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PySequence_Size/null/input.c: In function 'handle_PySequence_Size_NULL': > tests/cpychecker/refcounts/PySequence_Size/null/input.c:29:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-pyth--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,40 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:26 as non-NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyTuple_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyTuple_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyTuple_GetItem()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyTuple_GetItem with NULL as argument 1 (some_tuple.0) at tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:32 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,20 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c', line=51), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c:51 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('foo') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('foo')") >- str(): region for gcc.ParmDecl('foo') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c', line=43), region=Region("region-for-type-of-arg-gcc.ParmDecl('foo')")) >- region for gcc.ParmDecl('bar') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('bar')") >- str(): region for gcc.ParmDecl('bar') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c', line=43), region=Region("region-for-type-of-arg-gcc.ParmDecl('bar')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c:44 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c:51:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/incorrect-marking: OK >tests/cpychecker/refcounts/attributes/sets-exception/correct-marking: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/sets-exception/correct-marking/input.c:40:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/sets-exception/correct-usage: OK >tests/cpychecker/refcounts/attributes/sets-exception/incorrect-marking: OK >tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking/input.c:51:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_Gimple--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,108 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when Py_BuildValue() succeeds' >- 'taking False path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37), region=RegionOnHeap('new ref from call to Py_BuildValue', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to Py_BuildValue', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37)) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37), region=Region('PyTypeObject for new ref from call to Py_BuildValue')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=34)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when Py_BuildValue() fails' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=34)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >- >-Trace 2: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'when Py_BuildValue() fails' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=34)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >- >-Trace 3: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'when Py_BuildValue() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=37), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:37 >ddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/Py_BuildValue/correct: OK >tests/cpychecker/refcounts/Py_BuildValue/correct-code-N: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c: In function 'test': > tests/cpychecker/refcounts/Py_BuildValue/correct-code-N/input.c:37:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/Py_BuildValue/correct-code-O: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c: In function 'test': > tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:39:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_t--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/Py_BuildValue/correct-code-O/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,40 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:26 as non-NULL' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=32), region=RegionOnHeap('borrowed reference returned by PyTuple_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('borrowed reference returned by PyTuple_GetItem()', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=32)) from tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=32), region=Region('PyTypeObject for borrowed reference returned by PyTuple_GetItem()')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:30 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:26 as NULL' >- error: NullPtrArgument() >- error: possibly calling PyTuple_GetItem with NULL as argument 1 (some_tuple.0) at tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,10 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:35:nn: warning: future use-after-free: ob_refcnt of return value is 1 too low >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32:nn: note: return value was allocated at: item = PyTuple_GetItem(some_tuple, 3); >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:35:nn: note: was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:26 as non-NULL at: item = PyTuple_GetItem(some_tuple, 3); >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32:nn: note: ob_refcnt is now refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:33:nn: note: taking True path at: if (item) { >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:35:nn: note: reaching: return item; >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:35:nn: note: returning >-tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:30:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >y", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_GetItem/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_GetItem/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_GetItem/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyTuple_GetItem/correct/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_GetItem/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyTuple_GetItem/incorrect/input.c:32:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in --- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,142 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'taking False path' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() succeeds' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36)) from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=31), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:27 >- >-Trace 1: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'taking False path' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() succeeds' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36)) from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:27 >- >-Trace 2: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'taking False path' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() fails' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=31), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36 >- >-Trace 3: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'taking False path' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() fails' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=36), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36 >- >-Trace 4: >- Transitions: >- 'when PyObject_Repr() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/correct/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/correct/input.c:31 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,42 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3252, in impl_PyString_AsString >+ 'PyString_AsString() returns ob_sval') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,48 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=59), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:59 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:43: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=43)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:43 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=43), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:40 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c', line=39), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:43 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:59:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,20 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c', line=46), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('foo') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('foo')") >- str(): region for gcc.ParmDecl('foo') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c', line=40), region=Region("region-for-type-of-arg-gcc.ParmDecl('foo')")) >- region for gcc.ParmDecl('bar') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('bar')") >- str(): region for gcc.ParmDecl('bar') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c', line=40), region=Region("region-for-type-of-arg-gcc.ParmDecl('bar')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:41 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,8 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: warning: memory leak: ob_refcnt of '*foo' is 1 too high >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: note: was expecting final owned ob_refcnt of '*foo' to be -1 since nothing references it but final ob_refcnt is refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: note: returning at: Py_RETURN_NONE; >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: warning: memory leak: ob_refcnt of '*bar' is 1 too high >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: note: was expecting final owned ob_refcnt of '*bar' to be -1 since nothing references it but final ob_refcnt is refs: 0 owned, 1 borrowed >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: note: returning at: Py_RETURN_NONE; >-tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:41:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >Assign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage/input.c:59:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c: In function 'test': > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking/input.c:46:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lv--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,45 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyTuple_Size() returns ob_size' >- '__dump((Py_ssize_t)0 from tests/cpychecker/refcounts/PyTuple_New/correct/input.c:32)' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=32), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=32))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyTuple_New/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_New/correct/input.c:30 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=34), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_New/correct/input.c:34 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_New/correct/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_New/correct/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyTuple_New/correct/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3699, in impl_PyTuple_Size >+ fnmeta.desc_when_call_returns_value('ob_size')) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,135 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() succeeds' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38)) from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=31), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:27 >- >-Trace 1: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() succeeds' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38)) from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:27 >- >-Trace 2: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() fails' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=31), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- >-Trace 3: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'PyString_AsString() returns ob_sval' >- 'when PyString_FromFormat() fails' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=31)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- >-Trace 4: >- Transitions: >- 'when PyObject_Repr() fails' >- error: NullPtrArgument() >- error: calling PyString_AsString with NULL as argument 1 (repr_args) at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31 >on-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3207, in impl_PySequence_Size > t_err = self.handle_null_error(stmt, 0, v_o, rawreturnvalue=-1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 956, in handle_null_error > None) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyString_AsString/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyString_AsString/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyString_AsString/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyString_AsString/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyString_AsString/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyString_AsString/correct/input.c:36:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3252, in impl_PyString_AsString > 'PyString_AsString() returns ob_sval') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyString_AsString/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyString_AsString/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyString_AsString/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 303--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,5 +1,40 @@ > In function 'test': >-tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38:nn: warning: calling PyString_AsString with NULL as argument 1 (repr_args) at tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38 >-tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:31:nn: note: when PyObject_Repr() fails at: repr_args = PyObject_Repr(args); >-tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38:nn: note: PyString_AsString() invokes Py_TYPE() on the pointer via the PyString_Check() macro, thus accessing (NULL)->ob_type >-tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:27:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/PyString_AsString/incorrect/input.c:38:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3252, in impl_PyString_AsString >+ 'PyString_AsString() returns ob_sval') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,44 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=30), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=30)) from tests/cpychecker/refcounts/correct_decref/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/correct_decref/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/correct_decref/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_decref/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/correct_decref/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'correct_decref': >+tests/cpychecker/refcounts/correct_decref/input.c:37:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,87 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyString_AsString() succeeds' >- 'when PyString_FromFormat() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33)) from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyString_AsString() succeeds' >- 'when PyString_FromFormat() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >- >-Trace 2: >- Transitions: >- 'when PyString_AsString() fails' >- 'when PyString_FromFormat() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33)) from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >- >-Trace 3: >- Transitions: >- 'when PyString_AsString() fails' >- 'when PyString_FromFormat() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyString_AsString/unknown/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3261, in impl_PyString_AsString >+ fnmeta.desc_when_call_succeeds()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,20 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_py_none/input.c', line=25), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/correct_py_none/input.c:25 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_py_none/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/correct_py_none/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/correct_py_none/input.c:24 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'correct_none': >+tests/cpychecker/refcounts/correct_py_none/input.c:25:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,109 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27)) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:32: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=32)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:32 >- >-Trace 2: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=27)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:32 >- >-Trace 3: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=29), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:29 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:27 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_SET_ITEM_macro': >+tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_New/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_New/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_New/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_New/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_New/correct/input.c: In function 'test': > tests/cpychecker/refcounts/PyTuple_New/correct/input.c:37:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3699, in impl_PyTuple_Size > fnmeta.desc_when_call_returns_value('ob_size')) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_Pack/incorrect-arg-count: OK >tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c: In function 'handle_SET_ITEM_macro': > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct/input.c:34:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,80 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:24 as non-NULL' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=30), region=Region('heap-region-0')) >- str(): (struct PyObject *)&Region('heap-region-0') from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:30 >- r->ob_refcnt: (Py_ssize_t)val [-0x7fffffffffffffff <= val <= 0x7fffffffffffffff] from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:46 >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:24 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:24 as NULL' >- 'taking True path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=36), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=36))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=36)) from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:36 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Region('heap-region-0'): >- repr(): Region('heap-region-0') >- str(): Region('heap-region-0') >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:24 >- >-Trace 2: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:24 as NULL' >- 'taking True path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/correct/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Region('heap-region-0'): >- repr(): Region('heap-region-0') >- str(): Region('heap-region-0') >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/storage_regions/static/correct/input.c:36 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test': >+tests/cpychecker/refcounts/storage_regions/static/correct/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >3, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3252, in impl_PyString_AsString > 'PyString_AsString() returns ob_sval') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyString_AsString/unknown: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyString_AsString/unknown/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyString_AsString/unknown/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyString_AsString/unknown/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyString_AsString/unknown/input.c: In function 'test': > tests/cpychecker/refcounts/PyString_AsString/unknown/input.c:33:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 3261, in impl_PyString_AsString > fnmeta.desc_when_call_succeeds()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyString_Concat/basic: OK >tests/cpychecker/refcounts/storage_regions/static/correct: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/storage_regions/static/correct/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/storage_regions/static/correct/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/storage_regions/static/correct/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/storage_regions/static/correct/input.c: In function 'test': > tests/cpychecker/refcounts/storage_regions/static/correct/input.c:30:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > tran--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,647 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=50)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 2: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 3: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 4: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 5: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 6: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 7: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 8: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:50 >- >-Trace 9: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 10: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 11: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 12: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:44 >- >-Trace 13: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- >-Trace 14: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,40 @@ >+In function 'handle_SET_ITEM_macro': >+tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,5 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/reference/input.cc:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'void test(int&)': >+tests/cpychecker/refcounts/cplusplus/reference/input.cc:27:7: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >alue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-usage: OK >tests/cpychecker/refcounts/correct_decref: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/correct_decref/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/correct_decref/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/correct_decref/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/correct_decref/input.c: In function 'correct_decref': > tests/cpychecker/refcounts/correct_decref/input.c:37:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/correct_py_none: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/correct_py_none/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/correct_py_none/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/correct_py_none/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/correct_py_none/input.c: In function 'correct_none': > tests/cpychecker/refcounts/correct_py_none/input.c:25:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/cplusplus/method: OK >tests/cpychecker/refcounts/cplusplus/reference: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/cplusplus/reference/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpyc--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,31 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyObject_Repr() succeeds' >- 'taking True path' >- 'PyString_AsString() returns ob_sval' >- 'not returning from exit' >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/function-that-exits/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- PyStringObject allocated at tests/cpychecker/refcounts/function-that-exits/input.c:33: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/function-that-exits/input.c', line=33)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/function-that-exits/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/function-that-exits/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/function-that-exits/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyObject_Repr() fails' >- 'taking False path' >- 'not returning from exit' >- region for gcc.ParmDecl('obj') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('obj')") >- str(): region for gcc.ParmDecl('obj') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/function-that-exits/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('obj')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/function-that-exits/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/function-that-exits/input.c:40:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,70 +0,0 @@ >-Trace 0: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24 as non-NULL' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=30), region=Region('heap-region-0')) >- str(): (struct PyObject *)&Region('heap-region-0') from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:30 >- r->ob_refcnt: None >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24 >- >-Trace 1: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24 as NULL' >- 'taking True path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=36), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=36))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=36)) from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=36), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24 >- >-Trace 2: >- Transitions: >- 'when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24 as NULL' >- 'taking True path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,14 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:49:nn: warning: future use-after-free: ob_refcnt of return value is 1 too low >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36:nn: note: return value was allocated at: cache = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:49:nn: note: was expecting final owned ob_refcnt of return value to be 2 due to object being referenced by: return value, cache but final ob_refcnt is refs: 1 owned >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:30:nn: note: when treating unknown struct PyObject * from tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24 as NULL at: if (!cache) { >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:30:nn: note: taking True path at: if (!cache) { >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36:nn: note: reaching: cache = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36:nn: note: when PyLong_FromLong() succeeds at: cache = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:36:nn: note: return value is now referenced by 1 non-stack value(s): cache >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:37:nn: note: taking False path at: if (!cache) { >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:49:nn: note: reaching: return cache; >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:49:nn: note: returning >-tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:24:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,647 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=50)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=50), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 2: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 3: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 4: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 5: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 6: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 7: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 8: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=44)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50 >- >-Trace 9: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 10: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 11: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 12: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:48 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44 >- >-Trace 13: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyTuple_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- >-Trace 14: >- Transitions: >- 'when PyTuple_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33: >- repr(): RegionOnHeap('PyTupleObject', gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=33)) >- str(): PyTupleObject allocated at tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyTuple_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33 >/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c: In function 'handle_SET_ITEM_macro': > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple/input.c:39:16: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c: In function 'handle_SET_ITEM_macro': > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39:16: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong > 'PyLong_Type') > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor > s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,21 +1,40 @@ > In function 'handle_SET_ITEM_macro': >-cc1: warning: memory leak: ob_refcnt of PyLongObject is 1 too high >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: PyLongObject was allocated at: items[2] = PyLong_FromLong(3000); >-cc1: note: was expecting final owned ob_refcnt of PyLongObject to be 1 due to object being referenced by: PyTupleObject.ob_item[2] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:33:nn: note: when PyTuple_New() succeeds at: tuple = PyTuple_New(3); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:34:nn: note: taking False path at: if (!tuple) { >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39:nn: note: reaching: items[0] = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39:nn: note: when PyLong_FromLong() succeeds at: items[0] = PyLong_FromLong(1000); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:40:nn: note: taking False path at: if (!items[0]) { >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44:nn: note: reaching: items[1] = PyLong_FromLong(2000); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:44:nn: note: when PyLong_FromLong() succeeds at: items[1] = PyLong_FromLong(2000); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:45:nn: note: taking False path at: if (!items[1]) { >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: reaching: items[2] = PyLong_FromLong(3000); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: when PyLong_FromLong() succeeds at: items[2] = PyLong_FromLong(3000); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:50:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:51:nn: note: taking False path at: if (!items[2]) { >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:64:nn: note: reaching: PyTuple_SET_ITEM(tuple, 0, items[0]); >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:66:nn: note: PyLongObject is now referenced by 1 non-stack value(s): PyTupleObject.ob_item[2] >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:71:nn: note: ob_refcnt is now refs: 2 owned >-cc1: note: returning >-tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:24:nn: note: graphical error report for function 'handle_SET_ITEM_macro' written out to 'tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c.handle_SET_ITEM_macro-refcount-errors.html' >+tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2420, in impl_PyLong_FromLong >+ 'PyLong_Type') >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 726, in object_ctor >+ s_success, nonnull = self.mkstate_new_ref(stmt, typename, typeobjregion) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,31 +0,0 @@ >-Trace 0: >- Transitions: >- 'when make_wrapper() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=42), region=RegionOnHeap('new ref from (unknown) make_wrapper', gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=42))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) make_wrapper', gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=42)) from tests/cpychecker/refcounts/getter/input.c:42 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=42), region=Region('PyTypeObject for new ref from (unknown) make_wrapper')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/getter/input.c:36 >- >-Trace 1: >- Transitions: >- 'when make_wrapper() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=42), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/getter/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/getter/input.c', line=35), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/getter/input.c:42 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'simple_getter': >+tests/cpychecker/refcounts/getter/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >races > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/Py_BuildValue/correct-code-s: OK >tests/cpychecker/refcounts/Py_FatalError/correct: OK >tests/cpychecker/refcounts/Py_Finalize/correct: OK >tests/cpychecker/refcounts/SWIG_Python_ErrorType/correct: OK >tests/cpychecker/refcounts/_PyObject_New/correct: OK >tests/cpychecker/refcounts/cplusplus/simple: OK >tests/cpychecker/refcounts/cplusplus/this: OK >tests/cpychecker/refcounts/function-that-exits: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/function-that-exits/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/function-that-exits/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/function-that-exits/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/function-that-exits/input.c: In function 'test': > tests/cpychecker/refcounts/function-that-exits/input.c:40:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/getter: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/getter/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/getter/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/getter/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/getter/input.c: In function 'simple_getter': > tests/cpychecker/refcounts/getter/input.c:42:12: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/l--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,41 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyString_FromFormat() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=39), region=RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=39))) >- str(): (struct PyObject *)&RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=39)) from tests/cpychecker/refcounts/subclass/handling/input.c:39 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=37), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=37), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/subclass/handling/input.c:38 >- >-Trace 1: >- Transitions: >- 'when PyString_FromFormat() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=39), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/subclass/handling/input.c:39 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=37), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/handling/input.c', line=37), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/subclass/handling/input.c:39 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,32 @@ >+In function 'test_function': >+tests/cpychecker/refcounts/subclass/handling/input.c:40:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >sitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/storage_regions/static/incorrect: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/storage_regions/static/incorrect/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/storage_regions/static/incorrect/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c: In function 'test': > tests/cpychecker/refcounts/storage_regions/static/incorrect/input.c:30:9: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/subclass/detection: OK >tests/cpychecker/refcounts/subclass/handling: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/subclass/handling/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/subclass/handling/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/subclass/handling/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/subclass/handling/input.c: In function 'test_function': > tests/cpychecker/refcounts/subclass/handling/input.c:40:32: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,114 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'when PyObject_GetItem() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), region=RegionOnHeap('new ref from call to PyObject_GetItem', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_GetItem', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38)) from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), region=Region('PyTypeObject for new ref from call to PyObject_GetItem')) >- region for gcc.ParmDecl('mapping') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('mapping')") >- str(): region for gcc.ParmDecl('mapping') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('mapping')")) >- PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=33)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/handle_null_error/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'when PyObject_GetItem() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), region=RegionOnHeap('new ref from call to PyObject_GetItem', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyObject_GetItem', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38)) from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), region=Region('PyTypeObject for new ref from call to PyObject_GetItem')) >- region for gcc.ParmDecl('mapping') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('mapping')") >- str(): region for gcc.ParmDecl('mapping') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('mapping')")) >- PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=33)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/handle_null_error/input.c:28 >- >-Trace 2: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'when PyObject_GetItem() fails' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- region for gcc.ParmDecl('mapping') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('mapping')") >- str(): region for gcc.ParmDecl('mapping') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('mapping')")) >- PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=33)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyString_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- >-Trace 3: >- Transitions: >- 'when PyString_FromString() succeeds' >- 'when PyObject_GetItem() fails' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- region for gcc.ParmDecl('mapping') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('mapping')") >- str(): region for gcc.ParmDecl('mapping') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('mapping')")) >- PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33: >- repr(): RegionOnHeap('PyStringObject', gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=33)) >- str(): PyStringObject allocated at tests/cpychecker/refcounts/handle_null_error/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- >-Trace 4: >- Transitions: >- 'when PyString_FromString() fails' >- 'when PyObject_GetItem fails due to NULL as argument 2 at tests/cpychecker/refcounts/handle_null_error/input.c:38' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/handle_null_error/input.c:38 >- region for gcc.ParmDecl('mapping') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('mapping')") >- str(): region for gcc.ParmDecl('mapping') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/handle_null_error/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('mapping')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/handle_null_error/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,38 @@ >+In function 'test': >+tests/cpychecker/refcounts/handle_null_error/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,10 +0,0 @@ >-Trace 0: >- Transitions: >- 'returning' >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 5 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c', line=42), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:43 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,10 +1,32 @@ > In function 'test_function': >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:53:nn: warning: memory leak: ob_refcnt of '*self' is 5 too high >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:53:nn: note: was expecting final owned ob_refcnt of '*self' to be 0 since nothing references it but final ob_refcnt is refs: 5 owned, 1 borrowed >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:48:nn: note: ob_refcnt is now refs: 1 owned, 1 borrowed >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:49:nn: note: ob_refcnt is now refs: 2 owned, 1 borrowed >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:50:nn: note: ob_refcnt is now refs: 3 owned, 1 borrowed >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:51:nn: note: ob_refcnt is now refs: 4 owned, 1 borrowed >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:52:nn: note: ob_refcnt is now refs: 5 owned, 1 borrowed >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:53:nn: note: returning at: } >-tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:43:nn: note: graphical error report for function 'test_function' written out to 'tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c.test_function-refcount-errors.html' >+tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:48:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,30 +0,0 @@ >-Trace 0: >- Transitions: >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/ticket-20/input.c', line=36), value=0) >- str(): (int)0 from tests/cpychecker/refcounts/ticket-20/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: -1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/ticket-20/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/ticket-20/input.c:31 >- >-Trace 1: >- Transitions: >- 'when taking False path' >- 'calling unknown void (*destructor) (struct PyObject *) from tests/cpychecker/refcounts/ticket-20/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='int', loc=gcc.Location(file='tests/cpychecker/refcounts/ticket-20/input.c', line=36), value=0) >- str(): (int)0 from tests/cpychecker/refcounts/ticket-20/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: -1 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/ticket-20/input.c', line=30), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/ticket-20/input.c:31 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,9 +1,32 @@ > In function 'test': >-tests/cpychecker/refcounts/ticket-20/input.c:36:nn: warning: future use-after-free: ob_refcnt of '*self' is 1 too low >-tests/cpychecker/refcounts/ticket-20/input.c:36:nn: note: was expecting final owned ob_refcnt of '*self' to be 0 since nothing references it but final ob_refcnt is refs: -1 owned, 1 borrowed >-tests/cpychecker/refcounts/ticket-20/input.c:33:nn: note: ob_refcnt is now refs: -1 owned, 1 borrowed >-tests/cpychecker/refcounts/ticket-20/input.c:33:nn: note: when taking True path at: Py_DECREF(self); >-tests/cpychecker/refcounts/ticket-20/input.c:36:nn: note: reaching: return 0; >-tests/cpychecker/refcounts/ticket-20/input.c:36:nn: note: returning at: return 0; >-tests/cpychecker/refcounts/ticket-20/input.c:36:nn: note: found 1 similar trace(s) to this >-tests/cpychecker/refcounts/ticket-20/input.c:31:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/ticket-20/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/ticket-20/input.c:33:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,215 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= count.1 <= 0' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38)) from tests/cpychecker/refcounts/loop_n_times/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=42)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=42), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= count.1 <= 0' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38)) from tests/cpychecker/refcounts/loop_n_times/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=42)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when considering range: 1 <= count.1 <= 0x7fffffff' >- 'taking True path' >- 'PyList_SetItem() succeeds' >- 'when considering count.1 == (int)1 from tests/cpychecker/refcounts/loop_n_times/input.c:34' >- 'taking False path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38)) from tests/cpychecker/refcounts/loop_n_times/input.c:38 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=42)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:42 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=42), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:29 >- >-Trace 3: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:38: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:38 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loop_n_times/input.c:42 >- >-Trace 4: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:38' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=45), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:45 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:38: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=38)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loop_n_times/input.c:38 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loop_n_times/input.c:42 >- >-Trace 5: >- Transitions: >- 'when PyArg_ParseTuple() succeeds' >- 'taking False path' >- 'when PyList_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=40), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:40 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loop_n_times/input.c:38 >- >-Trace 6: >- Transitions: >- 'when PyArg_ParseTuple() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=35), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loop_n_times/input.c:35 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loop_n_times/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_TypeError')) from tests/cpychecker/refcounts/loop_n_times/input.c:34 >ibcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/handle_null_error: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/handle_null_error/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/handle_null_error/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/handle_null_error/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/handle_null_error/input.c: In function 'test': > tests/cpychecker/refcounts/handle_null_error/input.c:39:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/incorrect_py_none: OK >tests/cpychecker/refcounts/json/basic: OK >tests/cpychecker/refcounts/loop_n_times: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/loop_n_times/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/loop_n_times/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/loop_n_times/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/loop_n_times/input.c: In function 'loop_n_times': > tests/cpychecker/refcounts/loop_n_times/input.c:34:10: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple > v_fmt, v_varargs, with_size_t=False) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function > s_success --- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'loop_n_times': >+tests/cpychecker/refcounts/loop_n_times/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1161, in impl_PyArg_ParseTuple >+ v_fmt, v_varargs, with_size_t=False) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1064, in _handle_PyArg_function >+ s_success = self.state.mkstate_concrete_return_of(stmt, 1) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,39 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=26), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=26))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=26)) from tests/cpychecker/refcounts/too_many_increfs/input.c:26 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=26), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/too_many_increfs/input.c:24 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() fails' >- error: NullPtrDereference() >- error: dereferencing NULL (tmp->ob_refcnt) at tests/cpychecker/refcounts/too_many_increfs/input.c:30 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/too_many_increfs/input.c', line=23), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/too_many_increfs/input.c:26 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,11 +1,34 @@ > In function 'too_many_increfs': >-tests/cpychecker/refcounts/too_many_increfs/input.c:31:nn: warning: memory leak: ob_refcnt of return value is 1 too high >-tests/cpychecker/refcounts/too_many_increfs/input.c:26:nn: note: return value was allocated at: tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/too_many_increfs/input.c:31:nn: note: was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/too_many_increfs/input.c:26:nn: note: when PyLong_FromLong() succeeds at: tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/too_many_increfs/input.c:26:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/too_many_increfs/input.c:30:nn: note: ob_refcnt is now refs: 2 owned >-tests/cpychecker/refcounts/too_many_increfs/input.c:31:nn: note: returning at: return tmp; >-tests/cpychecker/refcounts/too_many_increfs/input.c:30:nn: warning: dereferencing NULL (tmp->ob_refcnt) at tests/cpychecker/refcounts/too_many_increfs/input.c:30 >-tests/cpychecker/refcounts/too_many_increfs/input.c:26:nn: note: when PyLong_FromLong() fails at: tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/too_many_increfs/input.c:24:nn: note: graphical error report for function 'too_many_increfs' written out to 'tests/cpychecker/refcounts/too_many_increfs/input.c.too_many_increfs-refcount-errors.html' >+tests/cpychecker/refcounts/too_many_increfs/input.c:30:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c: In function 'test_function': > tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr/input.c:48:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/subclass/opaque-struct: OK >tests/cpychecker/refcounts/ticket-20: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/ticket-20/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/ticket-20/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/ticket-20/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/ticket-20/input.c: In function 'test': > tests/cpychecker/refcounts/ticket-20/input.c:33:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/too_many_increfs: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/too_many_increfs/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/too_many_increfs/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/too_many_increfs/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/too_many_increfs/input.c: In function 'too_many_increfs': > tests/cpychecker/refcounts/too_many_increfs/input.c:30:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-pl--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,311 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering unknown_unsigned_val.1 == (const unsigned int)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:22' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() succeeds' >- 'taking False path' >- 'when considering unknown_unsigned_val.1 == (const unsigned int)1 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:22' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39), region=Region('PyTypeObject for new ref from (unknown) make_item')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39), region=Region('PyTypeObject for new ref from (unknown) make_item')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39), region=Region('PyTypeObject for new ref from (unknown) make_item')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=39)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- >-Trace 7: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff' >- 'taking True path' >- 'when make_item() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39 >- >-Trace 8: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=61), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:61 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,24 +1,40 @@ > In function 'test': >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:57:nn: warning: memory leak: ob_refcnt of '*item' is 1 too high >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39:nn: note: '*item' was allocated at: PyObject *item = make_item(i); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:57:nn: note: was expecting final owned ob_refcnt of '*item' to be 1 due to object being referenced by: PyListObject.ob_item[0] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:33:nn: note: when PyList_New() succeeds at: result = PyList_New(0); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:34:nn: note: taking False path at: if (!result) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: note: reaching: for (i = 0; i < unknown_unsigned_val; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: note: when considering range: 1 <= unknown_unsigned_val.1 <= 0xffffffff at: for (i = 0; i < unknown_unsigned_val; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: note: taking True path at: for (i = 0; i < unknown_unsigned_val; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39:nn: note: reaching: PyObject *item = make_item(i); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39:nn: note: when make_item() succeeds at: PyObject *item = make_item(i); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:39:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:40:nn: note: taking False path at: if (!item) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43:nn: note: reaching: if (-1 == PyList_Append(result, item)) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43:nn: note: when PyList_Append() succeeds at: if (-1 == PyList_Append(result, item)) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43:nn: note: ob_refcnt is now refs: 2 owned >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43:nn: note: '*item' is now referenced by 1 non-stack value(s): PyListObject.ob_item[0] >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:43:nn: note: taking False path at: if (-1 == PyList_Append(result, item)) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: note: reaching: for (i = 0; i < unknown_unsigned_val; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: note: when considering unknown_unsigned_val.1 == (const unsigned int)1 from tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:22 at: for (i = 0; i < unknown_unsigned_val; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: note: taking False path at: for (i = 0; i < unknown_unsigned_val; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:57:nn: note: reaching: return result; >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:57:nn: note: returning >-tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:29:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,311 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= value <= 0' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= value <= 1' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- r->ob_refcnt: refs: 2 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40), region=Region('PyTypeObject for new ref from (unknown) make_item')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40), region=Region('PyTypeObject for new ref from (unknown) make_item')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44 >- >-Trace 3: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40), region=Region('PyTypeObject for new ref from (unknown) make_item')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44 >- >-Trace 4: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44 >- >-Trace 5: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() succeeds' >- 'taking False path' >- 'when PyList_Append() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40: >- repr(): RegionOnHeap('new ref from (unknown) make_item', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=40)) >- str(): new ref from (unknown) make_item allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44 >- >-Trace 6: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- >-Trace 7: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= value <= 0x7fffffff' >- 'taking True path' >- 'when make_item() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=33)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40 >- >-Trace 8: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=55), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:55 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33 >= self.state.mkstate_concrete_return_of(stmt, 1) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/loops/complex-loop-conditional-1: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/loops/complex-loop-conditional-1/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/loops/complex-loop-conditional-1/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c: In function 'test': > tests/cpychecker/refcounts/loops/complex-loop-conditional-1/input.c:38:19: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/loops/complex-loop-conditional-2: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/loops/complex-loop-conditional-2/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/loops/complex-loop-conditional-2/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c: In function 'test': > tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:26: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_tra--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,24 +1,40 @@ > In function 'test': >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:51:nn: warning: memory leak: ob_refcnt of '*item' is 1 too high >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40:nn: note: '*item' was allocated at: PyObject *item = make_item(i); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:51:nn: note: was expecting final owned ob_refcnt of '*item' to be 1 due to object being referenced by: PyListObject.ob_item[0] but final ob_refcnt is refs: 2 owned >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:33:nn: note: when PyList_New() succeeds at: result = PyList_New(0); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:34:nn: note: taking False path at: if (!result) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: note: reaching: for (i = 0; i < (2 * get_limit()) + 42; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: note: when considering range: 1 <= value <= 0x7fffffff at: for (i = 0; i < (2 * get_limit()) + 42; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: note: taking True path at: for (i = 0; i < (2 * get_limit()) + 42; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40:nn: note: reaching: PyObject *item = make_item(i); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40:nn: note: when make_item() succeeds at: PyObject *item = make_item(i); >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:40:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:41:nn: note: taking False path at: if (!item) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44:nn: note: reaching: if (-1 == PyList_Append(result, item)) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44:nn: note: when PyList_Append() succeeds at: if (-1 == PyList_Append(result, item)) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44:nn: note: ob_refcnt is now refs: 2 owned >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44:nn: note: '*item' is now referenced by 1 non-stack value(s): PyListObject.ob_item[0] >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:44:nn: note: taking False path at: if (-1 == PyList_Append(result, item)) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: note: reaching: for (i = 0; i < (2 * get_limit()) + 42; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: note: when considering range: -0x80000000 <= value <= 1 at: for (i = 0; i < (2 * get_limit()) + 42; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: note: taking False path at: for (i = 0; i < (2 * get_limit()) + 42; i++) { >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:51:nn: note: reaching: return result; >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:51:nn: note: returning >-tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:29:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/loops/complex-loop-conditional-2/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2283, in _get_transitions_for_GimpleCall >+ None)], >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,27 +1,36 @@ > In function 'test': >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:46:nn: warning: memory leak: ob_refcnt of new ref from call to PyObject_CallObject is 1 too high >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: new ref from call to PyObject_CallObject was allocated at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:46:nn: note: was expecting final owned ob_refcnt of new ref from call to PyObject_CallObject to be 0 since nothing references it but final ob_refcnt is refs: 1 owned >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() succeeds at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: taking False path at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: reaching: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() succeeds at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when taking True path at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:46:nn: note: reaching: } >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:46:nn: note: returning at: } >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:46:nn: note: found 4 similar trace(s) to this >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: warning: dereferencing NULL (D.nnnnn->ob_type) at tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35 >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() succeeds at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: taking False path at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: reaching: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() succeeds at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when taking False path at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: reaching: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() fails at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: warning: dereferencing NULL (D.nnnnn->ob_refcnt) at tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35 >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() succeeds at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: taking False path at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: reaching: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: note: when PyObject_CallObject() fails at: Py_XDECREF(PyObject_CallObject(callable, args)); >-tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:29:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2821, in impl_PyObject_CallObject >+ return self.make_transitions_for_new_ref_or_fail(stmt, fnmeta) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 881, in make_transitions_for_new_ref_or_fail >+ s_success, nonnull = self.mkstate_new_ref(stmt, objname) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,42 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= len <= 0' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=34), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=34)) from tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= len <= 0x7fffffff' >- 'taking True path' >- error: UsageOfUninitializedData() >- error: comparison against uninitialized data (item) at tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:41 >- PyListObject allocated at tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/comparison/input.c', line=52), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:52 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,9 +1,34 @@ > In function 'test': >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:41:nn: warning: comparison against uninitialized data (item) at tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:41 >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34:nn: note: when PyList_New() succeeds at: result = PyList_New(len); >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:35:nn: note: taking False path at: if (!result) { >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:39:nn: note: reaching: for (i = 0; i < len; i++) { >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:39:nn: note: when considering range: 1 <= len <= 0x7fffffff at: for (i = 0; i < len; i++) { >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:39:nn: note: taking True path at: for (i = 0; i < len; i++) { >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:41:nn: note: reaching: if (!item) { >-tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:29:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/uninitialized_data/comparison/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,42 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: -0x80000000 <= len <= 0' >- 'taking False path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=34), region=RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=34)) from tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyList_New() succeeds' >- 'taking False path' >- 'when considering range: 1 <= len <= 0x7fffffff' >- 'taking True path' >- error: UsageOfUninitializedData() >- error: passing uninitialized data (item) as argument 3 to function at tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:41 >- PyListObject allocated at tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34: >- repr(): RegionOnHeap('PyListObject', gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=34)) >- str(): PyListObject allocated at tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyList_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyList_New() fails' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c', line=48), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:48 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,9 +1,34 @@ > In function 'test': >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:41:nn: warning: passing uninitialized data (item) as argument 3 to function at tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:41 >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34:nn: note: when PyList_New() succeeds at: result = PyList_New(len); >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:35:nn: note: taking False path at: if (!result) { >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:39:nn: note: reaching: for (i = 0; i < len; i++) { >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:39:nn: note: when considering range: 1 <= len <= 0x7fffffff at: for (i = 0; i < len; i++) { >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:39:nn: note: taking True path at: for (i = 0; i < len; i++) { >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:41:nn: note: reaching: PyList_SetItem(result, i, item); >-tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:29:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >ugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/tp_iternext/correct: OK >tests/cpychecker/refcounts/tp_iternext/partial-type-object: OK >tests/cpychecker/refcounts/uninitialized_data/comparison: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/uninitialized_data/comparison/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/uninitialized_data/comparison/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/uninitialized_data/comparison/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/uninitialized_data/comparison/input.c: In function 'test': > tests/cpychecker/refcounts/uninitialized_data/comparison/input.c:34:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/uninitialized_data/function_arg: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/uninitialized_data/function_arg/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/uninitialized_data/function_arg/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c: In function 'test': > tests/cpychecker/refcounts/uninitialized_data/function_arg/input.c:34:14: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-p--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,485 +0,0 @@ >-Trace 0: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/module_handling/input.c:44 >- >-Trace 1: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 2: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:71 >- >-Trace 3: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 4: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:70 >- >-Trace 5: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 6: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:71 >- >-Trace 7: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 8: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:69 >- >-Trace 9: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 10: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:71 >- >-Trace 11: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 12: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:70 >- >-Trace 13: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() succeeds' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 14: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() succeeds' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:71 >- >-Trace 15: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() succeeds' >- 'taking False path' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'when PyModule_AddIntConstant() fails' >- 'when PyModule_AddStringConstant() fails' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:72 >- >-Trace 16: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() fails' >- 'taking True path' >- 'when taking True path' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:64 >- >-Trace 17: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyModule_AddObject() fails' >- 'taking True path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=58)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/module_handling/input.c:58 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:64 >- >-Trace 18: >- Transitions: >- 'when Py_InitModule4_64() succeeds' >- 'taking False path' >- 'when PyDict_New() fails' >- 'taking True path' >- 'returning' >- borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50: >- repr(): RegionOnHeap('borrowed reference returned by Py_InitModule4_64()', gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50)) >- str(): borrowed reference returned by Py_InitModule4_64() allocated at tests/cpychecker/refcounts/module_handling/input.c:50 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/module_handling/input.c', line=50), region=Region('PyTypeObject for borrowed reference returned by Py_InitModule4_64()')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:58 >- >-Trace 19: >- Transitions: >- 'when Py_InitModule4_64() fails' >- 'taking True path' >- 'returning' >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/module_handling/input.c:50 >nsitions_for_GimpleCall > None)], > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/macros/Py_XDECREF/crash: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/macros/Py_XDECREF/crash/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/macros/Py_XDECREF/crash/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c: In function 'test': > tests/cpychecker/refcounts/macros/Py_XDECREF/crash/input.c:35:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2821, in impl_PyObject_CallObject > return self.make_transitions_for_new_ref_or_fail(stmt, fnmeta) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 881, in make_transitions_for_new_ref_or_fail > s_success, nonnull = self.mkstate_new_ref(stmt, objname) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 835, in mkstate_new_ref > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/missing_decref: OK >tests/cpychecker/refcounts/module_handling: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/module_handling/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/module_handling/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/module_handling/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/module_handling/input.c: In function 'PyInit_example': > tests/cpychecker/refcounts/module_handling/input.c:64:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2566, in impl_PyModule_AddObject > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,42 @@ >+In function 'PyInit_example': >+tests/cpychecker/refcounts/module_handling/input.c:64:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 2566, in impl_PyModule_AddObject >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,138 +0,0 @@ >-Trace 0: >- Transitions: >- 'when foo() succeeds' >- 'taking False path' >- 'when taking True path' >- 'when foo() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43), region=RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43)) from tests/cpychecker/refcounts/unrecognized_function2/input.c:43 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43), region=Region('PyTypeObject for new ref from (unknown) foo')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34: >- repr(): RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=34)) >- str(): new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=34), region=Region('PyTypeObject for new ref from (unknown) foo')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function2/input.c:30 >- >-Trace 1: >- Transitions: >- 'when foo() succeeds' >- 'taking False path' >- 'when taking True path' >- 'when foo() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function2/input.c:43 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34: >- repr(): RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=34)) >- str(): new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=34), region=Region('PyTypeObject for new ref from (unknown) foo')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/unrecognized_function2/input.c:43 >- >-Trace 2: >- Transitions: >- 'when foo() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34' >- 'when foo() succeeds' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43), region=RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43))) >- str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43)) from tests/cpychecker/refcounts/unrecognized_function2/input.c:43 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43), region=Region('PyTypeObject for new ref from (unknown) foo')) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34: >- repr(): RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=34)) >- str(): new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function2/input.c:30 >- >-Trace 3: >- Transitions: >- 'when foo() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34' >- 'when foo() fails' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=43), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function2/input.c:43 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34: >- repr(): RegionOnHeap('new ref from (unknown) foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=34)) >- str(): new ref from (unknown) foo allocated at tests/cpychecker/refcounts/unrecognized_function2/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/unrecognized_function2/input.c:43 >- >-Trace 4: >- Transitions: >- 'when foo() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=36), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function2/input.c:36 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function2/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/unrecognized_function2/input.c:34 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'call_to_unrecognized_function': >+tests/cpychecker/refcounts/unrecognized_function2/input.c:40:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,111 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37)) from tests/cpychecker/refcounts/multiple-returns/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/multiple-returns/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37)) from tests/cpychecker/refcounts/multiple-returns/input.c:37 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=37), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/multiple-returns/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyDict_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/multiple-returns/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=32)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/multiple-returns/input.c:32 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/multiple-returns/input.c:37 >- >-Trace 3: >- Transitions: >- 'when PyDict_New() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/multiple-returns/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/multiple-returns/input.c', line=28), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/multiple-returns/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,13 +1,40 @@ > In function 'test': >-tests/cpychecker/refcounts/multiple-returns/input.c:38:nn: warning: memory leak: ob_refcnt of '*dictA' is 1 too high >-tests/cpychecker/refcounts/multiple-returns/input.c:32:nn: note: '*dictA' was allocated at: dictA = PyDict_New(); >-tests/cpychecker/refcounts/multiple-returns/input.c:38:nn: note: was expecting final owned ob_refcnt of '*dictA' to be 0 since nothing references it but final ob_refcnt is refs: 1 owned >-tests/cpychecker/refcounts/multiple-returns/input.c:32:nn: note: when PyDict_New() succeeds at: dictA = PyDict_New(); >-tests/cpychecker/refcounts/multiple-returns/input.c:32:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/multiple-returns/input.c:33:nn: note: taking False path at: if (!dictA) return NULL; >-tests/cpychecker/refcounts/multiple-returns/input.c:37:nn: note: reaching: dictB = PyDict_New(); >-tests/cpychecker/refcounts/multiple-returns/input.c:37:nn: note: when PyDict_New() fails at: dictB = PyDict_New(); >-tests/cpychecker/refcounts/multiple-returns/input.c:38:nn: note: taking True path at: if (!dictB) return NULL; >-tests/cpychecker/refcounts/multiple-returns/input.c:38:nn: note: reaching: if (!dictB) return NULL; >-tests/cpychecker/refcounts/multiple-returns/input.c:38:nn: note: returning >-tests/cpychecker/refcounts/multiple-returns/input.c:29:nn: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/multiple-returns/input.c.test-refcount-errors.html' >+tests/cpychecker/refcounts/multiple-returns/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,79 +0,0 @@ >-Trace 0: >- Transitions: >- 'when make_foo() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=42), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/unrecognized_function4/input.c:42 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=34), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=34), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) make_foo allocated at tests/cpychecker/refcounts/unrecognized_function4/input.c:36: >- repr(): RegionOnHeap('new ref from (unknown) make_foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=36)) >- str(): new ref from (unknown) make_foo allocated at tests/cpychecker/refcounts/unrecognized_function4/input.c:36 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=36), region=Region('PyTypeObject for new ref from (unknown) make_foo')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function4/input.c:35 >- >-Trace 1: >- Transitions: >- 'when make_foo() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from (unknown) make_foo allocated at tests/cpychecker/refcounts/unrecognized_function4/input.c:36' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=42), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct'))) >- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/unrecognized_function4/input.c:42 >- r->ob_refcnt: refs: 1 owned, 1 borrowed >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=34), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=34), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- new ref from (unknown) make_foo allocated at tests/cpychecker/refcounts/unrecognized_function4/input.c:36: >- repr(): RegionOnHeap('new ref from (unknown) make_foo', gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=36)) >- str(): new ref from (unknown) make_foo allocated at tests/cpychecker/refcounts/unrecognized_function4/input.c:36 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function4/input.c:35 >- >-Trace 2: >- Transitions: >- 'when make_foo() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=38), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/unrecognized_function4/input.c:38 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=34), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/unrecognized_function4/input.c', line=34), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/unrecognized_function4/input.c:36 >lugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/unrecognized_function: OK >tests/cpychecker/refcounts/unrecognized_function2: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/unrecognized_function2/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/unrecognized_function2/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/unrecognized_function2/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/unrecognized_function2/input.c: In function 'call_to_unrecognized_function': > tests/cpychecker/refcounts/unrecognized_function2/input.c:40:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/unrecognized_function3: OK >tests/cpychecker/refcounts/unrecognized_function4: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/unrecognized_function4/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/unrecognized_function4/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/unrecognized_function4/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/unrecognized_function4/input.c: In function 'test': > tests/cpychecker/refcounts/unrecognized_function4/input.c:40:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absint--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,36 @@ >+In function 'test': >+tests/cpychecker/refcounts/unrecognized_function4/input.c:40:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,561 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() succeeds' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) from tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48), region=Region('PyTypeObject for new ref from call through function pointer')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:29 >- >-Trace 1: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34))) >- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) from tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48), region=Region('PyTypeObject for new ref from call through function pointer')) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:29 >- >-Trace 2: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48), region=Region('PyTypeObject for new ref from call through function pointer')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 3: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 4: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48), region=Region('PyTypeObject for new ref from call through function pointer')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 5: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 6: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48), region=Region('PyTypeObject for new ref from call through function pointer')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 7: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 8: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48), region=Region('PyTypeObject for new ref from call through function pointer')) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 9: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call succeeds' >- 'taking False path' >- 'when PyDict_SetItem() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48: >- repr(): RegionOnHeap('new ref from call through function pointer', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=48)) >- str(): new ref from call through function pointer allocated at tests/cpychecker/refcounts/object_from_callback/input.c:48 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:54 >- >-Trace 10: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:48 >- >-Trace 11: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:48 >- >-Trace 12: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:48 >- >-Trace 13: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when call fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=39)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:39 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:48 >- >-Trace 14: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:39 >- >-Trace 15: >- Transitions: >- 'when PyDict_New() succeeds' >- 'taking False path' >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34: >- repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=34)) >- str(): PyDictObject allocated at tests/cpychecker/refcounts/object_from_callback/input.c:34 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:39 >- >-Trace 16: >- Transitions: >- 'when PyDict_New() fails' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/object_from_callback/input.c', line=71), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/object_from_callback/input.c:71 >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/object_from_callback/input.c:34 >/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/multiple-returns: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/multiple-returns/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/multiple-returns/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/multiple-returns/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/multiple-returns/input.c: In function 'test': > tests/cpychecker/refcounts/multiple-returns/input.c:42:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/not_setting_exception: OK >tests/cpychecker/refcounts/object_from_callback: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/object_from_callback/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/object_from_callback/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/object_from_callback/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/object_from_callback/input.c: In function 'test': > tests/cpychecker/refcounts/object_from_callback/input.c:54:15: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997,--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -0,0 +1,54 @@ >+In function 'test': >+tests/cpychecker/refcounts/object_from_callback/input.c:54:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleCall(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall >+ return meth(stmt, *args) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1615, in impl_PyDict_SetItem >+ v_dp, v_key, v_item) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem >+ s_success = self.state.mkstate_concrete_return_of(stmt, 0) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of >+ stmt.loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,70 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=30), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=30))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=30)) from tests/cpychecker/refcounts/use_after_dealloc/input.c:30 >- r->ob_refcnt: refs: 1 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/use_after_dealloc/input.c:28 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/use_after_dealloc/input.c:30' >- error: ReadFromDeallocatedMemory() >- error: reading from deallocated memory at tests/cpychecker/refcounts/use_after_dealloc/input.c:42: memory deallocated at tests/cpychecker/refcounts/use_after_dealloc/input.c:41 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/use_after_dealloc/input.c:30: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=30)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/use_after_dealloc/input.c:30 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/use_after_dealloc/input.c:28 >- >-Trace 2: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=33), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/use_after_dealloc/input.c:33 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/use_after_dealloc/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/use_after_dealloc/input.c:30 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,10 +1,36 @@ > In function 'use_after_dealloc': >-tests/cpychecker/refcounts/use_after_dealloc/input.c:42:nn: warning: reading from deallocated memory at tests/cpychecker/refcounts/use_after_dealloc/input.c:42: memory deallocated at tests/cpychecker/refcounts/use_after_dealloc/input.c:41 >-tests/cpychecker/refcounts/use_after_dealloc/input.c:30:nn: note: when PyLong_FromLong() succeeds at: PyObject *tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/use_after_dealloc/input.c:32:nn: note: taking False path at: if (!tmp) { >-tests/cpychecker/refcounts/use_after_dealloc/input.c:41:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/use_after_dealloc/input.c:41:nn: note: when taking False path at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/use_after_dealloc/input.c:41:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/use_after_dealloc/input.c:41:nn: note: calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/use_after_dealloc/input.c:30 at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/use_after_dealloc/input.c:42:nn: note: reaching: Py_INCREF(tmp); >-tests/cpychecker/refcounts/use_after_dealloc/input.c:28:nn: note: graphical error report for function 'use_after_dealloc' written out to 'tests/cpychecker/refcounts/use_after_dealloc/input.c.use_after_dealloc-refcount-errors.html' >+tests/cpychecker/refcounts/use_after_dealloc/input.c:41:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,67 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/passing_dead_object/input.c:32: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=32)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/passing_dead_object/input.c:32 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/passing_dead_object/input.c:30 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/passing_dead_object/input.c:32' >- error: PassingPointerToDeallocatedMemory() >- error: passing pointer to deallocated memory as argument 1 of function at tests/cpychecker/refcounts/passing_dead_object/input.c:45: memory deallocated at tests/cpychecker/refcounts/passing_dead_object/input.c:42 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- PyLongObject allocated at tests/cpychecker/refcounts/passing_dead_object/input.c:32: >- repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=32)) >- str(): PyLongObject allocated at tests/cpychecker/refcounts/passing_dead_object/input.c:32 >- r->ob_refcnt: None >- r->ob_type: None >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/passing_dead_object/input.c:30 >- >-Trace 2: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/passing_dead_object/input.c', line=29), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/passing_dead_object/input.c:32 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,10 +1,36 @@ > In function 'passing_dead_object_to_function': >-tests/cpychecker/refcounts/passing_dead_object/input.c:45:nn: warning: passing pointer to deallocated memory as argument 1 of function at tests/cpychecker/refcounts/passing_dead_object/input.c:45: memory deallocated at tests/cpychecker/refcounts/passing_dead_object/input.c:42 >-tests/cpychecker/refcounts/passing_dead_object/input.c:32:nn: note: when PyLong_FromLong() succeeds at: PyObject *tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/passing_dead_object/input.c:34:nn: note: taking False path at: if (!tmp) { >-tests/cpychecker/refcounts/passing_dead_object/input.c:42:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/passing_dead_object/input.c:42:nn: note: when taking False path at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/passing_dead_object/input.c:42:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/passing_dead_object/input.c:42:nn: note: calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/passing_dead_object/input.c:32 at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/passing_dead_object/input.c:45:nn: note: reaching: foo(tmp); >-tests/cpychecker/refcounts/passing_dead_object/input.c:30:nn: note: graphical error report for function 'passing_dead_object_to_function' written out to 'tests/cpychecker/refcounts/passing_dead_object/input.c.passing_dead_object_to_function-refcount-errors.html' >+tests/cpychecker/refcounts/passing_dead_object/input.c:42:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >--- Expected stdout (after cleaning) >+++ Actual stdout (after cleaning) >@@ -1,69 +0,0 @@ >-Trace 0: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when taking True path' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29)) from tests/cpychecker/refcounts/returning_dead_object/input.c:29 >- r->ob_refcnt: refs: 0 owned >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29), region=RegionForGlobal(gcc.VarDecl('PyLong_Type'))) >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/returning_dead_object/input.c:27 >- >-Trace 1: >- Transitions: >- 'when PyLong_FromLong() succeeds' >- 'taking False path' >- 'when taking False path' >- 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/returning_dead_object/input.c:29' >- 'returning' >- Return value: >- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29), region=RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29))) >- str(): (struct PyObject *)&RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=29)) from tests/cpychecker/refcounts/returning_dead_object/input.c:29 >- r->ob_refcnt: None >- r->ob_type: None >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)0 from tests/cpychecker/refcounts/returning_dead_object/input.c:27 >- >-Trace 2: >- Transitions: >- 'when PyLong_FromLong() fails' >- 'taking True path' >- 'returning' >- Return value: >- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=32), value=0) >- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/returning_dead_object/input.c:32 >- region for gcc.ParmDecl('self') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('self')") >- str(): region for gcc.ParmDecl('self') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) >- region for gcc.ParmDecl('args') on stack: >- repr(): RegionOnStack("region for gcc.ParmDecl('args')") >- str(): region for gcc.ParmDecl('args') on stack >- r->ob_refcnt: refs: 0 owned, 1 borrowed >- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/returning_dead_object/input.c', line=26), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) >- Exception: >- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/returning_dead_object/input.c:29 >--- Expected stderr (after cleaning) >+++ Actual stderr (after cleaning) >@@ -1,23 +1,36 @@ > In function 'returning_dead_object': >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: warning: future use-after-free: ob_refcnt of return value is 1 too low >-tests/cpychecker/refcounts/returning_dead_object/input.c:29:nn: note: return value was allocated at: PyObject *tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: note: was expecting final owned ob_refcnt of return value to be 1 due to object being referenced by: return value but final ob_refcnt is refs: 0 owned >-tests/cpychecker/refcounts/returning_dead_object/input.c:29:nn: note: when PyLong_FromLong() succeeds at: PyObject *tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/returning_dead_object/input.c:29:nn: note: ob_refcnt is now refs: 1 owned >-tests/cpychecker/refcounts/returning_dead_object/input.c:31:nn: note: taking False path at: if (!tmp) { >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: ob_refcnt is now refs: 0 owned >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: when taking True path at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: note: reaching: return tmp; >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: note: returning >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: warning: returning pointer to deallocated memory >-tests/cpychecker/refcounts/returning_dead_object/input.c:29:nn: note: when PyLong_FromLong() succeeds at: PyObject *tmp = PyLong_FromLong(0x1000); >-tests/cpychecker/refcounts/returning_dead_object/input.c:31:nn: note: taking False path at: if (!tmp) { >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: when taking False path at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: reaching: Py_DECREF(tmp); >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/returning_dead_object/input.c:29 at: Py_DECREF(tmp); >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: note: reaching: return tmp; >-tests/cpychecker/refcounts/returning_dead_object/input.c:42:nn: note: returning >-tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: note: memory deallocated here >-tests/cpychecker/refcounts/returning_dead_object/input.c:27:nn: note: graphical error report for function 'returning_dead_object' written out to 'tests/cpychecker/refcounts/returning_dead_object/input.c.returning_dead_object-refcount-errors.html' >+tests/cpychecker/refcounts/returning_dead_object/input.c:39:nn: error: Unhandled Python exception raised calling 'execute' method >+Traceback (most recent call last): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute >+ self._check_refcounts(fun) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts >+ dump_json=self.dump_json) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts >+ maxtrans) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts >+ limits=limits) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces >+ depth + 1): >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces >+ transitions = curstate.get_transitions() >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions >+ return self._get_transitions_for_stmt(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt >+ return self._get_transitions_for_GimpleAssign(stmt) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign >+ None)] >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment >+ new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign >+ dest_region = self.eval_lvalue(lhs, loc) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue >+ region = self.var_region(expr.var) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region >+ check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) >+ File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance >+ raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) >+TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) > in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2065, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleCall(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2232, in _get_transitions_for_GimpleCall > return meth(stmt, *args) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1615, in impl_PyDict_SetItem > v_dp, v_key, v_item) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 1586, in _handle_PyDict_SetItem > s_success = self.state.mkstate_concrete_return_of(stmt, 0) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2116, in mkstate_concrete_return_of > stmt.loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/object_leak: OK >tests/cpychecker/refcounts/passing_dead_object: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/passing_dead_object/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/passing_dead_object/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/passing_dead_object/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/passing_dead_object/input.c: In function 'passing_dead_object_to_function': > tests/cpychecker/refcounts/passing_dead_object/input.c:42:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/returning_dead_object: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/returning_dead_object/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/returning_dead_object/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/returning_dead_object/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/returning_dead_object/input.c: In function 'returning_dead_object': > tests/cpychecker/refcounts/returning_dead_object/input.c:39:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/158 successes; 140 failures; 0 skipped >Failed tests: > tests/cpychecker/absinterp/arithmetic/correct > tests/cpychecker/absinterp/arithmetic/division-by-zero/possible > tests/cpychecker/absinterp/array-range/fully-checked > tests/cpychecker/absinterp/array-range/implicitly-correct > tests/cpychecker/absinterp/array-range/off-by-one > tests/cpychecker/absinterp/array-range/partial-initialization-on-stack > tests/cpychecker/absinterp/array-range/unchecked > tests/cpychecker/absinterp/array-range/upper-checked > tests/cpychecker/absinterp/arrays > tests/cpychecker/absinterp/arrays2 > tests/cpychecker/absinterp/arrays3 > tests/cpychecker/absinterp/arrays6 > tests/cpychecker/absinterp/arrays7 > tests/cpychecker/absinterp/casts/int-to-float > tests/cpychecker/absinterp/casts/int-to-pointer > tests/cpychecker/absinterp/casts/int-to-pointer2 > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-max-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-eq-min-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-max-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-ge-min-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-max-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-gt-min-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-max-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-le-min-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-max-of-WithinRange > tests/cpychecker/absinterp/comparisons/boundaries/ConcreteValue-lt-min-of-WithinRange > tests/cpychecker/absinterp/comparisons/pointers > tests/cpychecker/absinterp/custom-strdup > tests/cpychecker/absinterp/custom-strdup-with-attr > tests/cpychecker/absinterp/nested-fields > tests/cpychecker/absinterp/nested-fields2 > tests/cpychecker/absinterp/nested-fields3 > tests/cpychecker/absinterp/read-through-global-ptr-checked > tests/cpychecker/absinterp/read-through-global-ptr-unchecked > tests/cpychecker/absinterp/static-data > tests/cpychecker/absinterp/uninitialized-data > tests/cpychecker/absinterp/write-through-global-ptr-checked > tests/cpychecker/absinterp/write-through-global-ptr-unchecked > tests/cpychecker/refcounts/PyArg_Parse/correct_simple > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_O_bang > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_converter > tests/cpychecker/refcounts/PyArg_ParseTuple/correct_simple > tests/cpychecker/refcounts/PyArg_ParseTupleAndKeywords/correct_O > tests/cpychecker/refcounts/PyArg_UnpackTuple/correct > tests/cpychecker/refcounts/PyBool_FromLong/correct > tests/cpychecker/refcounts/PyDict_GetItem/correct > tests/cpychecker/refcounts/PyDict_GetItem/incorrect > tests/cpychecker/refcounts/PyDict_GetItemString/correct > tests/cpychecker/refcounts/PyDict_GetItemString/incorrect > tests/cpychecker/refcounts/PyDict_SetItem/correct > tests/cpychecker/refcounts/PyDict_SetItem/incorrect > tests/cpychecker/refcounts/PyDict_SetItemString/correct > tests/cpychecker/refcounts/PyDict_SetItemString/incorrect > tests/cpychecker/refcounts/PyErr_Clear/correct > tests/cpychecker/refcounts/PyErr_Format/correct > tests/cpychecker/refcounts/PyErr_PrintEx > tests/cpychecker/refcounts/PyErr_SetFromErrno/correct > tests/cpychecker/refcounts/PyErr_SetNone/correct > tests/cpychecker/refcounts/PyErr_SetObject/correct > tests/cpychecker/refcounts/PyErr_SetString/correct > tests/cpychecker/refcounts/PyFloat_AsDouble/correct_PyFloatObject > tests/cpychecker/refcounts/PyFloat_AsDouble/correct_cast > tests/cpychecker/refcounts/PyInt_AsLong/correct_cast > tests/cpychecker/refcounts/PyList_Append/correct > tests/cpychecker/refcounts/PyList_Append/incorrect > tests/cpychecker/refcounts/PyList_Append/incorrect-loop > tests/cpychecker/refcounts/PyList_Append/null-newitem > tests/cpychecker/refcounts/PyList_Append/ticket-22 > tests/cpychecker/refcounts/PyList_GetItem/correct > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/correct_multiple > tests/cpychecker/refcounts/PyList_SET_ITEM_macro/incorrect_multiple > tests/cpychecker/refcounts/PyMem_Malloc/correct/alloc-and-free > tests/cpychecker/refcounts/PyMem_Malloc/correct/free-NULL > tests/cpychecker/refcounts/PyObject_CallMethod/correct-code-N > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/correct > tests/cpychecker/refcounts/PyObject_CallMethodObjArgs/incorrect > tests/cpychecker/refcounts/PyObject_HasAttrString/correct > tests/cpychecker/refcounts/PyObject_IsTrue/correct > tests/cpychecker/refcounts/PySequence_SetItem/correct > tests/cpychecker/refcounts/PySequence_SetItem/incorrect > tests/cpychecker/refcounts/PySequence_Size/correct > tests/cpychecker/refcounts/PySequence_Size/null > tests/cpychecker/refcounts/PyString_AsString/correct > tests/cpychecker/refcounts/PyString_AsString/incorrect > tests/cpychecker/refcounts/PyString_AsString/unknown > tests/cpychecker/refcounts/PyString_Concat/leak-of-rhs > tests/cpychecker/refcounts/PyString_ConcatAndDel/correct > tests/cpychecker/refcounts/PyStructSequence/correct > tests/cpychecker/refcounts/PySys_SetObject/correct > tests/cpychecker/refcounts/PyTuple_GetItem/correct > tests/cpychecker/refcounts/PyTuple_GetItem/incorrect > tests/cpychecker/refcounts/PyTuple_New/correct > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/correct_multiple > tests/cpychecker/refcounts/PyTuple_SET_ITEM_macro/incorrect_multiple > tests/cpychecker/refcounts/PyTuple_SetItem/correct > tests/cpychecker/refcounts/PyTuple_SetItem/correct_multiple > tests/cpychecker/refcounts/PyTuple_SetItem/incorrect_multiple > tests/cpychecker/refcounts/PyType_IsSubtype/correct > tests/cpychecker/refcounts/PyWeakref_GetObject/correct > tests/cpychecker/refcounts/PyWeakref_GetObject/incorrect > tests/cpychecker/refcounts/Py_BuildValue/Py_TYPE > tests/cpychecker/refcounts/Py_BuildValue/correct-code-N > tests/cpychecker/refcounts/Py_BuildValue/correct-code-O > tests/cpychecker/refcounts/__builtin_expect > tests/cpychecker/refcounts/attributes/returns-borrowed-ref/correct-usage > tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-marking > tests/cpychecker/refcounts/attributes/sets-exception-on-nonzero-return/correct-usage > tests/cpychecker/refcounts/attributes/sets-exception/correct-marking > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-marking > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/correct-usage > tests/cpychecker/refcounts/attributes/steals-reference-to-arg/incorrect-marking > tests/cpychecker/refcounts/correct_decref > tests/cpychecker/refcounts/correct_py_none > tests/cpychecker/refcounts/cplusplus/reference > tests/cpychecker/refcounts/function-that-exits > tests/cpychecker/refcounts/getter > tests/cpychecker/refcounts/handle_null_error > tests/cpychecker/refcounts/loop_n_times > tests/cpychecker/refcounts/loops/complex-loop-conditional-1 > tests/cpychecker/refcounts/loops/complex-loop-conditional-2 > tests/cpychecker/refcounts/macros/Py_XDECREF/crash > tests/cpychecker/refcounts/module_handling > tests/cpychecker/refcounts/multiple-returns > tests/cpychecker/refcounts/object_from_callback > tests/cpychecker/refcounts/passing_dead_object > tests/cpychecker/refcounts/returning_dead_object > tests/cpychecker/refcounts/storage_regions/static/correct > tests/cpychecker/refcounts/storage_regions/static/incorrect > tests/cpychecker/refcounts/subclass/handling > tests/cpychecker/refcounts/subclass/incorrect-subclass-ptr > tests/cpychecker/refcounts/ticket-20 > tests/cpychecker/refcounts/too_many_increfs > tests/cpychecker/refcounts/uninitialized_data/comparison > tests/cpychecker/refcounts/uninitialized_data/function_arg > tests/cpychecker/refcounts/unrecognized_function2 > tests/cpychecker/refcounts/unrecognized_function4 > tests/cpychecker/refcounts/use_after_dealloc >_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/plugin/gc/_gc_selftest: OK >tests/plugin/gc/segfault-on-instance-of-pass-subclass: OK >tests/plugin/gimple-asm: OK >tests/plugin/identifiers: OK >tests/plugin/language-specific-errors/fullname: OK >tests/plugin/macros/correct: OK >tests/plugin/macros/too-early: OK >tests/plugin/namespace: OK >tests/plugin/syntax-error: OK >tests/plugin/sys: OK >tests/plugin/type-attributes: OK >tests/plugin/types: OK >tests/plugin/version: OK >hecker/refcounts/cplusplus/reference/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/cplusplus/reference/input.cc >Stdout: >Stderr: > tests/cpychecker/refcounts/cplusplus/reference/input.cc: In function 'void test(int&)': > tests/cpychecker/refcounts/cplusplus/reference/input.cc:27:7: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/examples/attributes-with-macros: OK >tests/examples/c/struct: OK >tests/examples/cplusplus/methods: OK >tests/examples/find-global-state: OK >tests/examples/lto: OK >tests/gccutils/graph: OK >tests/gccutils/topological-sort: OK >tests/plugin/attributes: OK >tests/plugin/callback-FINISH_DECL: OK >tests/plugin/callbacks/PLUGIN_FINISH: OK >tests/plugin/callbacks/args: OK >tests/plugin/callbacks/exception: OK >tests/plugin/callgraph: OK >tests/plugin/constants: OK >tests/plugin/diagnostics: OK >tests/plugin/enum-type: OK >tests/plugin/function-types: OK >tests/plugin/functions: OK >tests/plugin/gc/_force_garbage_collection: OK >erp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/use_after_dealloc: FAIL >returncode: 1 > compiling: gcc -c -fno-diagnostics-show-caret -ftrack-macro-expansion=0 -o tests/cpychecker/refcounts/use_after_dealloc/output.o -fplugin=/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/python2.so -fplugin-arg-python2-script=tests/cpychecker/refcounts/use_after_dealloc/script.py -fsigned-char -I/usr/include/python2.7 tests/cpychecker/refcounts/use_after_dealloc/input.c >Stdout: >Stderr: > tests/cpychecker/refcounts/use_after_dealloc/input.c: In function 'use_after_dealloc': > tests/cpychecker/refcounts/use_after_dealloc/input.c:41:5: error: Unhandled Python exception raised calling 'execute' method > Traceback (most recent call last): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 79, in execute > self._check_refcounts(fun) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/__init__.py", line 85, in _check_refcounts > dump_json=self.dump_json) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4393, in check_refcounts > maxtrans) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/refcounts.py", line 4248, in impl_check_refcounts > limits=limits) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 3033, in iter_traces > depth + 1): > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2997, in iter_traces > transitions = curstate.get_transitions() > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2049, in get_transitions > return self._get_transitions_for_stmt(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >tests/cpychecker/refcounts/without-python-headers: OK >tests/cpychecker/unknown-function: OK >BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2076, in _get_transitions_for_stmt > return self._get_transitions_for_GimpleAssign(stmt) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 2591, in _get_transitions_for_GimpleAssign > None)] > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1927, in mktrans_assignment > new.assign(lhs, rhs, self.stmtnode.get_gcc_loc()) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1567, in assign > dest_region = self.eval_lvalue(lhs, loc) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1447, in eval_lvalue > region = self.var_region(expr.var) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/libcpychecker/absinterp.py", line 1576, in var_region > check_isinstance(var, (gcc.VarDecl, gcc.ParmDecl, gcc.ResultDecl, gcc.FunctionDecl)) > File "/builddir/build/BUILD/gcc-python-plugin-0.15-building-for-python2/gccutils/__init__.py", line 637, in check_isinstance > raise TypeError('%s / %r is not an instance of %s' % (obj, obj, types)) > TypeError: None / None is not an instance of (<type 'gcc.VarDecl'>, <type 'gcc.ParmDecl'>, <type 'gcc.ResultDecl'>, <type 'gcc.FunctionDecl'>) >RPM build errors: >error: Bad exit status from /var/tmp/rpm-tmp.iwFdKD (%check) > Bad exit status from /var/tmp/rpm-tmp.iwFdKD (%check) >Child return code was: 1 >EXCEPTION: [Error()] >Traceback (most recent call last): > File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 89, in trace > result = func(*args, **kw) > File "/usr/lib/python3.5/site-packages/mockbuild/util.py", line 578, in do > raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode) >mockbuild.exception.Error: Command failed. See logs for output. > # bash --login -c /usr/bin/rpmbuild -bb --target ppc64 --nodeps /builddir/build/SPECS/gcc-python-plugin.spec
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1423592
: 1252155 |
1252156
|
1252157