summaryrefslogtreecommitdiff
path: root/gcc/symbol-summary.h
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2018-10-30 11:33:24 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2018-10-30 11:33:24 +0000
commit29f6f2d244c77dd7ae5a86b3bf7cb18fd953168f (patch)
tree1ee9b9016dfa2e295a56d7818b86352f608cf646 /gcc/symbol-summary.h
parent22e4f1fb6cda89074fa82ba70dfd757fb9ead5f0 (diff)
downloadgcc-29f6f2d244c77dd7ae5a86b3bf7cb18fd953168f.tar.gz
Don't allow the pool allocator to be configured to allocate zero-sized objects
PR bootstrap/87747 would have been significantly easier to track down if the pool allocator had faulted an attempt to configure it to allocate zero-sized objects. Instead, this slipped through and we later hit memory corruption when the assumed size turned out to be different to the configured size. While, theoretically, there might be a use case for this, it seems unlikely to me that GCC would have such a use. So this patch adds a checking assert that the object size is not zero. * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize): Assert that the allocation size is not zero. From-SVN: r265620
Diffstat (limited to 'gcc/symbol-summary.h')
0 files changed, 0 insertions, 0 deletions