Trying to run the checker on psycopg again :tada: Trying with psycopg/psycopg2@23438ce780396b1ffe87ae05953af0976b249e0b and gcc-python-plugin master at 41f52bd3ff54847af5ecd878887ecb18e7bfed93. Tested on Ubuntu 18.04 with gcc 5.5.0 and 6.5.0 (packages gcc-5 and gcc-6).
just a CC=gcc-with-cpychecker make fails on a file too complex, so I'm trying to run a normal make and using the generated commands to test the source files one-by-one. In particular here I'm playing with the file psycopg/utils.c so in order to get a command line you can use:
(Note that the -DPSYCOPG_VERSION option contain spaces so it needs quoting).
Testing the file psycopg/utils.c, a warning on the function psycopg_escape_string() being too complex is generated (is it?). Trying munging, applying the seemingly harmless patch:
psycopg/utils.c: In function ‘psycopg_escape_string’:
psycopg/utils.c:92:1: warning: label ‘exit’ defined but not used [-Wunused-label]
exit:
^~~~
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event | Plugins
PLUGIN_FINISH_DECL | python
PLUGIN_FINISH | python
PLUGIN_ATTRIBUTES | python
psycopg/utils.c:90:16: internal compiler error: Segmentation fault
*tolen = ql+eq+2;
~~~~~~~^~~~~~~~~
0x7f68dbae4f1a impl_execute
/home/piro/dev/fs/gcc-python-plugin/gcc-python-pass.c:134
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
Same problem with gcc-5. gcc-7 doesn't deal with refcount check so not playing with it.
Trying to run the checker on psycopg again :tada: Trying with psycopg/psycopg2@23438ce780396b1ffe87ae05953af0976b249e0b and gcc-python-plugin master at 41f52bd3ff54847af5ecd878887ecb18e7bfed93. Tested on Ubuntu 18.04 with gcc 5.5.0 and 6.5.0 (packages gcc-5 and gcc-6).
just a
CC=gcc-with-cpychecker make
fails on a file too complex, so I'm trying to run a normalmake
and using the generated commands to test the source files one-by-one. In particular here I'm playing with the filepsycopg/utils.c
so in order to get a command line you can use:and run instead:
(Note that the
-DPSYCOPG_VERSION
option contain spaces so it needs quoting).Testing the file
psycopg/utils.c
, a warning on the functionpsycopg_escape_string()
being too complex is generated (is it?). Trying munging, applying the seemingly harmless patch:results in a segfault with the following output:
Same problem with gcc-5. gcc-7 doesn't deal with refcount check so not playing with it.