mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2024-07-05 19:11:29 +00:00
14 lines
200 B
C++
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;
|
||
|
}
|