| 1877 | |
| 1878 | #ifdef FORCE_SAN_FAILURE |
| 1879 | static void force_san_failure() |
| 1880 | { |
| 1881 | // Purposely do things that should trigger the address sanitizer |
| 1882 | int arr[5] = { 0, 1, 2, 3, 4 }; |
| 1883 | printf("Out of bounds element: %d\n", arr[10]); |
| 1884 | |
| 1885 | //uint8_t* p = (uint8_t *)malloc(10); |
| 1886 | //p[10] = 99; |
| 1887 | |
| 1888 | //uint8_t* p = (uint8_t *)malloc(10); |
| 1889 | //free(p); |
| 1890 | //p[0] = 99; |
| 1891 | } |
| 1892 | #endif // FORCE_SAN_FAILURE |
| 1893 | |
| 1894 | int main(int arg_c, char* arg_v[]) |