*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit d5f15289 authored by Manstetten, Paul's avatar Manstetten, Paul
Browse files

small fixes

parent c98a50ce
Loading
......@@ -41,7 +41,7 @@ Sobald Sie sich in der Lage fühlen, diese Arbeitschritte und Aufgaben zu demons
```
4. Führen Sie jeden Test "manuell" einzeln aus und suchen Sie nach dem Problem unter Zuhilfename der Fehlermeldungen des *AddressSanitizer*. Vermerken Sie sich die Fehlermeldung im Quellcode als Kommentar.
```bash
cd build/test
cd build
make main1
./main1
```
......
......@@ -6,12 +6,20 @@
#include <errno.h> // errno
#include <string.h> // strerror
// TODO: write wrapper function wrap_malloc and replace call to malloc below with a call to wrap_malloc
// TODO: write wrapper function wrap_malloc and replace call to malloc below
// with a call to wrap_malloc
int main()
{
// triggers OOM
double *data = malloc(1e10 * sizeof(double));
free(data);
{
// triggers OOM
double *data = malloc(1e10 * sizeof(double));
free(data);
}
{
// triggers OOM
int *data = malloc(1e11 * sizeof(int));
free(data);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment