: taint_diagnostic (sm, arg, has_bounds),
m_mem_space (mem_space)
{
- gcc_assert (mem_space == MEMSPACE_STACK
- || mem_space == MEMSPACE_HEAP
- || mem_space == MEMSPACE_UNKNOWN);
}
const char *get_kind () const FINAL OVERRIDE
diagnostic_metadata m;
/* "CWE-789: Memory Allocation with Excessive Size Value". */
m.add_cwe (789);
- gcc_assert (m_mem_space == MEMSPACE_STACK
- || m_mem_space == MEMSPACE_HEAP
- || m_mem_space == MEMSPACE_UNKNOWN);
// TODO: make use of m_mem_space
if (m_arg)
switch (m_has_bounds)
const svalue *size_in_bytes,
region_model_context *ctxt) const
{
- gcc_assert (mem_space == MEMSPACE_STACK
- || mem_space == MEMSPACE_HEAP
- || mem_space == MEMSPACE_UNKNOWN);
gcc_assert (size_in_bytes);
gcc_assert (ctxt);
--- /dev/null
+char eparr[1];
+
+void *
+warn_realloc_extern_ptrarr_offset (int i, int n)
+{
+ return __builtin_realloc (eparr + i, n); /* { dg-warning "'__builtin_realloc' called on unallocated object 'eparr'" } */
+}