2011-02-28 Michael Snyder <msnyder@vmware.com>
* opencl-lang.c (lval_func_check_validity): Rename inner variables. (lval_func_check_synthetic_pointer): Ditto.
This commit is contained in:
parent
aee9ba6f90
commit
8f9a01eece
2 changed files with 11 additions and 9 deletions
|
@ -1,6 +1,8 @@
|
||||||
2011-02-28 Michael Snyder <msnyder@vmware.com>
|
2011-02-28 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
* opencl-lang.c (lval_func_free_closure): Fix use-after-free.
|
* opencl-lang.c (lval_func_check_validity): Rename inner variables.
|
||||||
|
(lval_func_check_synthetic_pointer): Ditto.
|
||||||
|
(lval_func_free_closure): Fix use-after-free.
|
||||||
|
|
||||||
2011-02-28 Tom Tromey <tromey@redhat.com>
|
2011-02-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
|
|
@ -263,11 +263,11 @@ lval_func_check_validity (const struct value *v, int offset, int length)
|
||||||
|
|
||||||
for (i = start; i < end; i++)
|
for (i = start; i < end; i++)
|
||||||
{
|
{
|
||||||
int startoffset = (i == start) ? startrest : 0;
|
int comp_offset = (i == start) ? startrest : 0;
|
||||||
int length = (i == end) ? endrest : elsize;
|
int comp_length = (i == end) ? endrest : elsize;
|
||||||
|
|
||||||
if (!value_bits_valid (c->val, c->indices[i] * elsize + startoffset,
|
if (!value_bits_valid (c->val, c->indices[i] * elsize + comp_offset,
|
||||||
length))
|
comp_length))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,12 +317,12 @@ lval_func_check_synthetic_pointer (const struct value *v,
|
||||||
|
|
||||||
for (i = start; i < end; i++)
|
for (i = start; i < end; i++)
|
||||||
{
|
{
|
||||||
int startoffset = (i == start) ? startrest : 0;
|
int comp_offset = (i == start) ? startrest : 0;
|
||||||
int length = (i == end) ? endrest : elsize;
|
int comp_length = (i == end) ? endrest : elsize;
|
||||||
|
|
||||||
if (!value_bits_synthetic_pointer (c->val,
|
if (!value_bits_synthetic_pointer (c->val,
|
||||||
c->indices[i] * elsize + startoffset,
|
c->indices[i] * elsize + comp_offset,
|
||||||
length))
|
comp_length))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue