diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/alloc-pool.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index da7b998..c07d3ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-30 Richard Earnshaw <rearnsha@arm.com> + + * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize): + Assert that the allocation size is not zero. + 2018-10-30 Richard Biener <rguenther@suse.de> PR tree-optimization/87800 diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h index c0a1292..d2ee000 100644 --- a/gcc/alloc-pool.h +++ b/gcc/alloc-pool.h @@ -256,6 +256,7 @@ base_pool_allocator <TBlockAllocator>::initialize () size_t size = m_size; gcc_checking_assert (m_name); + gcc_checking_assert (m_size); /* Make size large enough to store the list header. */ if (size < sizeof (allocation_pool_list*)) |