Details
Diff Detail
Event Timeline
Can we have tests for ptr = NULL, size=0? Probably just replace alloc and free by these cases and check returned address after each call?
openmp/runtime/src/kmp_alloc.cpp | ||
---|---|---|
1589 | Shouldn't this be after handling size==0? |
Nice suggestion, agree with it.
openmp/runtime/src/kmp_alloc.cpp | ||
---|---|---|
1589 | Actually, the assertion does not make sense at all, because size_t is unsigned. |
Please also change the openmp/runtime/tools/generate-def.pl file in order to not break Windows build.
See https://reviews.llvm.org/D91478 as an example of the change made for omp_calloc function.
The tests have the same format type issue as in D90967. Feel free to include the fixes for the calloc tests in this review.
PS: this summary does not show the inline code suggestions. They are only inline below :(
openmp/runtime/test/api/omp_realloc_def_fb.c | ||
---|---|---|
20–21 | ||
openmp/runtime/test/api/omp_realloc_null_ptr.c | ||
21–22 | ||
openmp/runtime/test/api/omp_realloc_size_0.c | ||
21–22 |
Shouldn't this be after handling size==0?