fix issue #31
by Tom Tromey
This fixes issue #31 by documenting a couple of fields of IntegerType.
The bug is just that min_value and max_value are not documented.
I looked and all the other fields are documented.
It would be nice if there were a way to verify that each field or method
is also documented, so that "make" would fail if something were missing.
Offhand I am not sure how best to do this.
Tom
>From 51de57a5b9ddb150d5eceee9332538caca87c7b1 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey(a)redhat.com>
Date: Tue, 24 Jan 2012 13:49:36 -0700
Subject: [PATCH 2/2] Fix issue #31
---
docs/tree.rst | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/docs/tree.rst b/docs/tree.rst
index cd3090f..d3798ad 100644
--- a/docs/tree.rst
+++ b/docs/tree.rst
@@ -425,6 +425,14 @@ Types
The gcc.IntegerType for the unsigned version of this type
+ .. py:attribute:: max_value
+
+ The maximum possible value for this type, as a `gcc.IntegerCst`
+
+ .. py:attribute:: min_value
+
+ The minimum possible value for this type, as a `gcc.IntegerCst`
+
.. py:class:: gcc.FloatType
Subclass of :py:class:`gcc.Type` representing C's `float` and `double` types
--
1.7.6.5
12 years, 2 months
fix issue #6
by Tom Tromey
This "fixes" issue #6 by documenting the current state.
The bug requests a way to call define_macro with two arguments, but
David pointed out that define_macro("NAME=VALUE") already works.
Tom
>From 4977934000d92c107d8d779476a2bfa2d84f9977 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey(a)redhat.com>
Date: Tue, 24 Jan 2012 13:29:16 -0700
Subject: [PATCH 1/2] Fix issue #6 by documenting that define_macro accepts a
definition as well.
---
docs/preprocessor.rst | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/docs/preprocessor.rst b/docs/preprocessor.rst
index 7e37f03..e4110f3 100644
--- a/docs/preprocessor.rst
+++ b/docs/preprocessor.rst
@@ -7,10 +7,17 @@ For languages that support a preprocessor, it's possible to inject new
The motivation for this is to better support the creation of custom
attributes, by creating preprocessor names that can be tested against.
-.. py:function:: gcc.define_macro(name)
+.. py:function:: gcc.define_macro(argument)
- Defines a preprocessor macro with the given name, which may be of use
- for code that needs to test for the presence of your script.
+ Defines a preprocessor macro with the given argument, which may be
+ of use for code that needs to test for the presence of your script.
+ The argument can either be a simple name, or a name with a
+ definition:
+
+ .. code-block:: python
+
+ gcc.define_macro("SOMETHING") # define as the empty string
+ gcc.define_macro("SOMETHING=72")
This function can only be called from within specific event callbacks,
since it manipulates the state of the preprocessor for a given source
--
1.7.6.5
12 years, 2 months
Compile with -fPIC on amd64
by David Narvaez
Hi,
A couple of weeks ago I sent a couple of patches via private e-mail to
David Malcom and one of them (attached) was not accepted because it
was not clear why it was needed. At the moment I didn't have more info
on that, but now that I came back to the issue, found some interesting
input. It turns out that, according to [0] you must compile shared
objects with -fPIC, so I keep getting this error when trying to build
the plugin in amd64:
======================================================================
ERROR: test_module_with_type (__main__.SimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "testcpybuilder.py", line 188, in test_module_with_type
bm.build(MODNAME)
File "testcpybuilder.py", line 102, in build
self.compile_src(extra_cflags)
File "testcpybuilder.py", line 95, in compile_src
raise CompilationError(self)
CompilationError:
returncode: 1
compiling: gcc -o /tmp/tmpzNKYHi/module_with_type.so
-I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing
-march=athlon64 -O2 -pipe -fwrapv -DNDEBUG -Wall -Werror -shared
/tmp/tmpzNKYHi/module_with_type.c
Stdout:
Stderr:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld:
/tmp/cco3TFC3.o: relocation R_X86_64_32 against `.rodata.str1.1' can
not be used when making a shared object; recompile with -fPIC
/tmp/cco3TFC3.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Can anybody give any input on this? Would it hurt to add the -fPIC
flag to the compilation?
Thanks!
David E. Narváez
[0] http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
12 years, 2 months
Additions for C++
by Stephan Bergmann
Hi Dave, all,
Attached is a cppadditions.patch (against recent git head of
gcc-python-plugin) that adds a number of attributes to various gcc.Tree
classes, mainly relevant for C++. It is surely far from polished and
there's probably some issues with it. Anyway, let me know what you
think about it.
* I added c_string_quote because of problems with quotes (") in docu
strings (where I shamelessly reused the documentation present in GCC's
tree.h and cp-tree.h, and that already contained those quotes). The
implementation of that function is surely evidence that I am no native
Python programmer... ;)
* I needed to add cu.add_include("cp/cp-tree.h") to generate-tree-c.py
-- not sure if that is acceptable (it would fail for GCC installations
that do not include C++ support).
I made those additions to be able to write the attached
unusedparameters.py, which I used to find unused function parameters in
the LibreOffice code base: When we made that code base warning-clean a
number of years ago, many warnings about unused parameters were silenced
by removing the parameter name, instead of actually fixing the code by
dropping the unused parameter. Of course, dropping an unused parameter
is not always the right fix, e.g., in virtual functions (where some
overrides require the parameter and others don't, so it consistently
needs to be present in all overrides). The script looks for unused,
unnamed parameters (so that they can be revisited now, deciding on a
proper fix), but takes into account patterns where the parameter is
likely legitimately unused (like in the case of virtual functions).
However, there are still a number of legitimately unused function
parameters that the script does not catch (think about functions that
need to adhere to a certain signature, so their addresses can be
assigned to function pointers of given type). So I started to annotate
those cases with GCC's __attribute__ ((unused)) in the LibreOffice
source code (and let unusedparameters.py ignore those). One problem I
found with that is that for constructors (and only for constructors),
the annotation needs to go into the constructor's declaration instead of
the definition, for unusedparameters.py to find it within
arg.attributes. That is,
class C { C(int); };
C::C(__attribute__ ((unused)) int) {}
causes unusedparameters.py to erroneously warn about the int parameter,
while
class C { C(__attribute__ ((unused)) int); };
C::C(int) {}
has the desired effect.
Does anybody happen to know whether that is a problem of GCC itself (I
observed it with Fedora 16's gcc-c++-4.6.2-1.fc16.x86_64) or of
gcc-python-plugin?
Stephan
12 years, 3 months
patch to add ArrayType.range
by Tom Tromey
I needed to be able to access the range of an array's type for a project
I'm working on.
This patch adds ArrayType.range, plus documentation and a test case.
Tom
>From 9c6e8dc36597f830331e073b86186ddda2fb9432 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey(a)redhat.com>
Date: Mon, 23 Jan 2012 07:49:59 -0700
Subject: [PATCH] Add ArrayType.range attribute
---
docs/tree.rst | 18 +++++++++++++++++
generate-tree-c.py | 5 ++++
tests/plugin/array-type/input.c | 37 ++++++++++++++++++++++++++++++++++++
tests/plugin/array-type/script.py | 36 +++++++++++++++++++++++++++++++++++
tests/plugin/array-type/stdout.txt | 3 ++
5 files changed, 99 insertions(+), 0 deletions(-)
create mode 100644 tests/plugin/array-type/input.c
create mode 100644 tests/plugin/array-type/script.py
create mode 100644 tests/plugin/array-type/stdout.txt
diff --git a/docs/tree.rst b/docs/tree.rst
index 316d8c4..cd3090f 100644
--- a/docs/tree.rst
+++ b/docs/tree.rst
@@ -459,6 +459,24 @@ Types
The :py:class:`gcc.Type` that this type points to. In the above
example, this would be the `char` type.
+ .. py:attribute:: range
+
+ The :py:class:`gcc.Type` that represents the range of the
+ array's indices. If the array has a known range, then this will
+ ordinarily be an :py:class:`gcc.IntegerType` whose `min_value`
+ and `max_value` are the (inclusive) bounds of the array. If the
+ array does not have a known range, then this attribute will be
+ `None`.
+
+ That is, in the example above, `range.min_val` is `0`, and
+ `range.max_val` is `15`.
+
+ But, for a C declaration like::
+
+ extern char array[];
+
+ the type's `range` would be `None`.
+
.. py:class:: gcc.VectorType
.. py:attribute:: dereference
diff --git a/generate-tree-c.py b/generate-tree-c.py
index 9e32924..9cf8f82 100644
--- a/generate-tree-c.py
+++ b/generate-tree-c.py
@@ -399,6 +399,11 @@ def generate_tree_code_classes():
'gcc_python_make_wrapper_tree(TREE_TYPE(self->t))',
"The gcc.Type that this type points to'")
+ if tree_type.SYM == 'ARRAY_TYPE':
+ add_simple_getter('range',
+ 'gcc_python_make_wrapper_tree(TYPE_DOMAIN(self->t))',
+ "The gcc.Type that is the range of this array type")
+
if tree_type.SYM == 'ARRAY_REF':
add_simple_getter('array',
'gcc_python_make_wrapper_tree(TREE_OPERAND(self->t, 0))',
diff --git a/tests/plugin/array-type/input.c b/tests/plugin/array-type/input.c
new file mode 100644
index 0000000..992d06d
--- /dev/null
+++ b/tests/plugin/array-type/input.c
@@ -0,0 +1,37 @@
+/*
+ Copyright 2012 Tom Tromey <tromey(a)redhat.com>
+ Copyright 2012 Red Hat, Inc.
+
+ This is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see
+ <http://www.gnu.org/licenses/>.
+*/
+
+/* Test some array attributes. */
+
+int arr[37];
+
+extern int arr2[];
+
+int function(void)
+{
+ return 23;
+}
+
+/*
+ PEP-7
+Local variables:
+c-basic-offset: 4
+indent-tabs-mode: nil
+End:
+*/
diff --git a/tests/plugin/array-type/script.py b/tests/plugin/array-type/script.py
new file mode 100644
index 0000000..5736323
--- /dev/null
+++ b/tests/plugin/array-type/script.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# Copyright 2012 Tom Tromey <tromey(a)redhat.com>
+# Copyright 2012 Red Hat, Inc.
+#
+# This is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/>.
+
+import gcc
+from gccutils import pprint
+
+def on_pass_execution(p, fn):
+ if p.name == '*warn_function_return':
+ assert isinstance(fn, gcc.Function)
+
+ for u in gcc.get_translation_units():
+ for v in u.block.vars:
+ if v.name == 'arr':
+ print('arr-range-min:%s' % v.type.range.min_value)
+ print('arr-range-max:%s' % v.type.range.max_value)
+ if v.name == 'arr2':
+ print('arr2-range:%s' % v.type.range)
+
+gcc.register_callback(gcc.PLUGIN_PASS_EXECUTION,
+ on_pass_execution)
+
diff --git a/tests/plugin/array-type/stdout.txt b/tests/plugin/array-type/stdout.txt
new file mode 100644
index 0000000..9dc5628
--- /dev/null
+++ b/tests/plugin/array-type/stdout.txt
@@ -0,0 +1,3 @@
+arr-range-min:0
+arr-range-max:36
+arr2-range:None
--
1.7.6.5
12 years, 3 months
GCC GC causes SEGV in my_walker
by Stephan Bergmann
With current head of gcc-pyhton-plugin
(6b633d4d5159ddd1024ab5b66ff1feeb133184ed, plus slight modification
> diff --git a/gcc-python-wrapper.c b/gcc-python-wrapper.c
> index 93234b0..5f3ba56 100644
> --- a/gcc-python-wrapper.c
> +++ b/gcc-python-wrapper.c
> @@ -28,7 +28,7 @@
> #include "gcc-python-compat.h"
>
> /* Debugging, for use by selftest routine */
> -static int debug_gcc_python_wrapper = 0;
> +static int debug_gcc_python_wrapper = 1;
>
> /* Maintain a circular linked list of PyGccWrapper instances: */
> static struct PyGccWrapper sentinel = {
> @@ -142,6 +142,9 @@ my_walker(void *arg ATTRIBUTE_UNUSED)
> printf("\n");
> }
> wrtp_mark = ((PyGccWrapperTypeObject*)Py_TYPE(iter))->wrtp_mark;
> + if (debug_gcc_python_wrapper) {
> + printf(" marking inner object; wrtp_mark = %p\n", wrtp_mark);
> + }
> assert(wrtp_mark);
> wrtp_mark(iter);
> }
to see what's going on; btw, assert seems to not work for me there, even
with no NDEBUG in sight) and a trivial plugin script
> import gcc
>
> class UnusedArg(gcc.GimplePass):
> def execute(self, fun):
> pass
>
> ps = UnusedArg(name='UnusedArg')
> ps.register_after('lower')
at least one scenario of calling g++ (with large input, and -g; looks
like this is related to GCC having to trigger its GC) keeps crashing for
me with
> [...]
> gcc_python_wrapper_track: gcc.Function
> gcc_python_wrapper_dealloc: gcc.Function
> gcc_python_wrapper_untrack: gcc.Function
> walking the live PyGccWrapper objects
> marking inner object for: UnusedArg(name='UnusedArg')
> marking inner object; wrtp_mark = (nil)
> *** 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 | python
> [...]: internal compiler error: Segmentation fault
> g++: internal compiler error: Aborted (program cc1plus)
at
> #7 <signal handler called>
> #8 0x0000000000000000 in ?? ()
> #9 0x00007fc4aed5fc20 in my_walker (arg=<optimized out>) at gcc-python-wrapper.c:149
> #10 0x00000000006b59b1 in ggc_mark_root_tab (rt=0x7fc4aef74fe0) at ../../gcc/ggc-common.c:142
> #11 ggc_mark_roots () at ../../gcc/ggc-common.c:164
> #12 0x00000000005beed6 in ggc_collect () at ../../gcc/ggc-page.c:1934
> #13 0x000000000072d0c5 in execute_todo (flags=3) at ../../gcc/passes.c:1293
> #14 0x000000000072f28f in execute_one_pass (pass=0x10f8a80) at ../../gcc/passes.c:1579
> #15 0x000000000072f5e5 in execute_pass_list (pass=0x10f8a80) at ../../gcc/passes.c:1611
> #16 0x00000000007f1251 in tree_rest_of_compilation (fndecl=0x7fc4a356e400) at ../../gcc/tree-optimize.c:422
> #17 0x0000000000916262 in cgraph_expand_function (node=0x7fc4a2cd9580) at ../../gcc/cgraphunit.c:1576
> #18 0x00000000009182e4 in cgraph_output_in_order () at ../../gcc/cgraphunit.c:1733
> #19 cgraph_optimize () at ../../gcc/cgraphunit.c:1894
> #20 0x00000000009183f5 in cgraph_finalize_compilation_unit () at ../../gcc/cgraphunit.c:1096
> #21 0x00000000005181c4 in cp_write_global_declarations () at ../../gcc/cp/decl2.c:4000
> #22 0x00000000007bc1f2 in compile_file () at ../../gcc/toplev.c:591
> #23 do_compile () at ../../gcc/toplev.c:1900
> #24 toplev_main (argc=20, argv=0x7fff93e6ac18) at ../../gcc/toplev.c:1963
> #25 0x00000037e682169d in __libc_start_main (main=0x4b0d00 <main>, argc=20, ubp_av=0x7fff93e6ac18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff93e6ac08) at libc-start.c:226
> #26 0x00000000004bfad9 in _start ()
Stephan
12 years, 3 months
Build problem
by Seo Sanghyeon
I have a problem building gcc-python-plugin. (commit 50214ad8)
cc -I/usr/lib/gcc/i486-linux-gnu/4.6/plugin/include -fPIC -O2 -Wall
-Werror -g -I/usr/include/python2.7 -I/usr/include/python2.7
-L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7
-Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -c -o
autogenerated-callgraph.o autogenerated-callgraph.c
autogenerated-callgraph.c: In function 'autogenerated_callgraph_add_types':
autogenerated-callgraph.c:211:5: error: dereferencing type-punned
pointer will break strict-aliasing rules [-Werror=strict-aliasing]
autogenerated-callgraph.c:214:5: error: dereferencing type-punned
pointer will break strict-aliasing rules [-Werror=strict-aliasing]
cc1: all warnings being treated as errors
--
Seo Sanghyeon
12 years, 3 months
Integration with GCC's garbage collector now in git
by David Malcolm
As of the 58d65a1b353220efbcf8d908b0946ef5d1c4fafd [1], the Python
plugin is now integrated with GCC's garbage collector. The Python
wrapper objects now collaborate in the marking phase of GCC's mark and
sweep, so that the wrapped GCC objects get marked [2], and (I hope) not
get swept and deleted from under us.
Hopefully you'll see absolutely no behavior changes with this (I never
ran into issues with this before), but this is a fairly deep and complex
change, so I thought it was worth a "heads up" on this mailing list.
Dave
[1]
http://git.fedorahosted.org/git/?p=gcc-python-plugin.git;a=commitdiff;h=5...
[2] (and the unmarked things they reference, recursively)
12 years, 3 months
ANN: gcc-python-plugin 0.8
by David Malcolm
gcc-python-plugin is a plugin for GCC 4.6 onwards which embeds the
CPython interpreter within GCC, allowing you to write new compiler
warnings in Python, generate code visualizations, etc.
It ships with "gcc-with-cpychecker", which implements static analysis
passes for GCC aimed at finding bugs in CPython extensions. In
particular, it can automatically detect reference-counting errors:
http://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html
Detailed release notes can be seen at:
http://gcc-python-plugin.readthedocs.org/en/latest/0.8.html
Some highlights of the 0.8 release:
* it's much easier than before to emit compilation warnings
* initial support for analyzing C++ code from a Python script
* gcc-with-cpychecker has gained additional tests. It now has
knowledge of which CPython API calls will crash when passed NULL, and
will warn you (with details) about code paths that can trigger such a
call. It can also now detect certain subtle errors in PyMethodDef
tables.
* numerous bug fixes and other improvements
Tarball releases are available at:
https://fedorahosted.org/releases/g/c/gcc-python-plugin/
Prebuilt-documentation can be seen at:
http://gcc-python-plugin.readthedocs.org/en/latest/index.html
The project's homepage is:
https://fedorahosted.org/gcc-python-plugin/
The plugin and checker are Free Software, licensed under the GPLv3 or
later. Thanks to Red Hat for funding their development, and to David
Narvaez and Tom Tromey for their contributions to this release.
Enjoy!
Dave Malcolm
12 years, 3 months
a few problems building gdb
by Tom Tromey
I pulled and rebuilt the plugin today on F15 x86-64.
Then I used it to build the gdb 7.4 branch with CC=gcc-with-cpychecker.
I didn't modify the plugin at all.
I can file bugs for these if you'd prefer, just let me know.
I got the appended Python exception trace.
For this:
../../src/gdb/arm-tdep.c:6798:22: error: Unhandled Python exception raised calling 'execute' method
The line in question is:
regmask &= ~(1 << regno);
Also:
../../src/gdb/arm-tdep.c:6464:6: error: comparison against uninitialized data: gcc.VarDecl(32844) at ../../src/gdb/arm-tdep.c:6464
The VarDecl bit seems like a formatting bug.
I wouldn't mind a mode where cpychecker doesn't emit any diagnostics for
functions unrelated to the use of Python. E.g., arm-tdep.c does not
call into Python at all, analyzing most of it seems like a waste of
time.
Finally, while compiling arm-tdep.c, cc1 started using lots and lots of
memory, enough that my machine noticeably slowed down. I C-c'd the
build, and this killed make and gcc -- but not cc1. In the end I had to
resort to kill. So, I surmise that there is some issue with C-c
handling in the plugin.
Tom
/home/tromey/Space/Trunk/gcc-python-plugin/gcc-with-cpychecker -g3 -gdwarf-4 -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/home/tromey/Space/gdb/7.4/install/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber -I../../src/gdb/gnulib -Ignulib -DTUI=1 -g3 -gdwarf-4 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -c -o arm-tdep.o -MT arm-tdep.o -MMD -MP -MF .deps/arm-tdep.Tpo ../../src/gdb/arm-tdep.c
../../src/gdb/arm-tdep.c: In function ‘arm_gdbarch_init’:
../../src/gdb/arm-tdep.c:9672:1: note: this function is too complicated for the reference-count checker to analyze
../../src/gdb/arm-tdep.c: In function ‘arm_record_special_symbol’:
../../src/gdb/arm-tdep.c:9408:1: note: this function is too complicated for the reference-count checker to analyze
../../src/gdb/arm-tdep.c: In function ‘arm_decode_svc_copro’:
../../src/gdb/arm-tdep.c:7694:1: note: this function is too complicated for the reference-count checker to analyze
../../src/gdb/arm-tdep.c: In function ‘arm_decode_ld_st_word_ubyte’:
../../src/gdb/arm-tdep.c:7500:1: note: this function is too complicated for the reference-count checker to analyze
../../src/gdb/arm-tdep.c: In function ‘arm_decode_dp_misc’:
../../src/gdb/arm-tdep.c:7454:1: note: this function is too complicated for the reference-count checker to analyze
../../src/gdb/arm-tdep.c: In function ‘cleanup_block_load_all’:
../../src/gdb/arm-tdep.c:6798:22: error: Unhandled Python exception raised calling 'execute' method
Traceback (most recent call last):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/__init__.py", line 52, in execute
self.show_possible_null_derefs)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/refcounts.py", line 2706, in check_refcounts
limits=limits)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2633, in iter_traces
for trace in iter_traces(fun, facets, newprefix, limits):
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2601, in iter_traces
transitions = curstate.get_transitions()
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 1766, in get_transitions
return self._get_transitions_for_stmt(stmt)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 1793, in _get_transitions_for_stmt
return self._get_transitions_for_GimpleAssign(stmt)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2243, in _get_transitions_for_GimpleAssign
value = self.eval_rhs(stmt)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 2186, in eval_rhs
c = a.eval_binop(stmt.exprcode, b, stmt.lhs.type, stmt.loc)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 402, in eval_binop
newvalue = eval_binop(exprcode, self.value, rhs.value)
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 314, in eval_binop
result = inner()
File "/home/tromey/Space/Trunk/gcc-python-plugin/libcpychecker/absinterp.py", line 303, in inner
return a << b
ValueError: negative shift count
../../src/gdb/arm-tdep.c: In function ‘arm_copy_ldr_str_ldrb_strb’:
../../src/gdb/arm-tdep.c:6667:1: note: this function is too complicated for the reference-count checker to analyze
../../src/gdb/arm-tdep.c: In function ‘arm_copy_extra_ld_st’:
../../src/gdb/arm-tdep.c:6464:6: error: comparison against uninitialized data: gcc.VarDecl(32844) at ../../src/gdb/arm-tdep.c:6464
../../src/gdb/arm-tdep.c:6443:6: note: when taking False path at: if (!insn_references_pc (insn, 0x000ff00ful))
../../src/gdb/arm-tdep.c:6446:7: note: reaching: if (debug_displaced)
../../src/gdb/arm-tdep.c:6446:6: note: when taking True path at: if (debug_displaced)
../../src/gdb/arm-tdep.c:6447:24: note: reaching: fprintf_unfiltered (gdb_stdlog, "displaced: copying %sextra load/store "
../../src/gdb/arm-tdep.c:6447:24: note: when taking True path at: fprintf_unfiltered (gdb_stdlog, "displaced: copying %sextra load/store "
../../src/gdb/arm-tdep.c:6447:24: note: reaching: fprintf_unfiltered (gdb_stdlog, "displaced: copying %sextra load/store "
../../src/gdb/arm-tdep.c:6453:6: note: taking False path at: if (opcode < 0)
../../src/gdb/arm-tdep.c:6457:36: note: reaching: dsc->tmp[0] = displaced_read_reg (regs, dsc, 0);
../../src/gdb/arm-tdep.c:6457:15: note: when treating unknown struct displaced_step_closure * from ../../src/gdb/arm-tdep.c:6430 as non-NULL at: dsc->tmp[0] = displaced_read_reg (regs, dsc, 0);
../../src/gdb/arm-tdep.c:6460:6: note: taking False path at: if (!immed)
../../src/gdb/arm-tdep.c:6463:31: note: reaching: rt_val = displaced_read_reg (regs, dsc, rt);
../../src/gdb/arm-tdep.c:6464:6: note: found 2 similar trace(s) to this
../../src/gdb/arm-tdep.c:6431:1: note: graphical error report for function 'arm_copy_extra_ld_st' written out to 'arm-tdep.c.arm_copy_extra_ld_st-refcount-errors.html'
12 years, 3 months