MCPcopy Create free account
hub / github.com/BinomialLLC/basis_universal / force_san_failure

Function force_san_failure

example/example.cpp:1879–1891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1877
1878#ifdef FORCE_SAN_FAILURE
1879static 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
1894int main(int arg_c, char* arg_v[])

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected