projects
/
platform
/
upstream
/
orc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42a1f65
)
compiler: avoid nagative array index
author
Wim Taymans
<wtaymans@redhat.com>
Wed, 17 Sep 2014 13:28:57 +0000
(15:28 +0200)
committer
Wim Taymans
<wtaymans@redhat.com>
Wed, 17 Sep 2014 13:28:57 +0000
(15:28 +0200)
For instructions that don't have a second variable, don't try to index
the variable array with a -1 index.
orc/orccompiler.c
patch
|
blob
|
history
diff --git
a/orc/orccompiler.c
b/orc/orccompiler.c
index
0086f77
..
bfb220f
100644
(file)
--- a/
orc/orccompiler.c
+++ b/
orc/orccompiler.c
@@
-927,7
+927,7
@@
orc_compiler_rewrite_vars2 (OrcCompiler *compiler)
compiler->vars[src2].alloc = 1;
} else {
int src2 = compiler->insns[j].src_args[1];
- if (compiler->vars[src2].alloc == 1) {
+ if (
src2 != -1 &&
compiler->vars[src2].alloc == 1) {
compiler->vars[src2].alloc = 0;
}
}