hardened_malloc/test/delete_type_size_mismatch.cc

15 lines
203 B
C++
Raw Normal View History

2018-10-11 05:44:41 +00:00
#include <stdint.h>
#include "test_util.h"
2018-10-11 05:44:41 +00:00
struct foo {
uint64_t a, b, c, d;
};
OPTNONE int main(void) {
2018-10-11 05:44:41 +00:00
void *p = new char;
struct foo *c = (struct foo *)p;
delete c;
return 0;
}