projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44e20dc
)
Fix off-by-one storage problem in irange_allocator.
author
Aldy Hernandez
<aldyh@redhat.com>
Tue, 6 Oct 2020 06:21:56 +0000
(08:21 +0200)
committer
Aldy Hernandez
<aldyh@redhat.com>
Tue, 6 Oct 2020 07:35:03 +0000
(09:35 +0200)
gcc/ChangeLog:
* value-range.h (irange_allocator::allocate): Increase
newir storage by one.
gcc/value-range.h
patch
|
blob
|
history
diff --git
a/gcc/value-range.h
b/gcc/value-range.h
index 94b48e55e778cd6842ee080b7c55fa260ac64801..7031a8231383671f57e7be174a8cdf1d8e014f0d 100644
(file)
--- a/
gcc/value-range.h
+++ b/
gcc/value-range.h
@@
-670,7
+670,7
@@
irange_allocator::allocate (unsigned num_pairs)
struct newir {
irange range;
- tree mem[
1
];
+ tree mem[
2
];
};
size_t nbytes = (sizeof (newir) + sizeof (tree) * 2 * (num_pairs - 1));
struct newir *r = (newir *) obstack_alloc (&m_obstack, nbytes);