hardened_malloc/test/simple-memory-corruption/delete_type_size_mismatch.cc
2018-10-11 01:45:47 -04:00

14 lines
200 B
C++

#include <stdint.h>
struct foo {
uint64_t a, b, c, d;
};
__attribute__((optimize(0)))
int main(void) {
void *p = new char;
struct foo *c = (struct foo *)p;
delete c;
return 0;
}