[OMPD] The LLVM OMPD ompd_enumerate_icvs() and ompd_enumerate_states() functions do not allocate the strings they returns
Opened this issue · 2 comments
jdelsign commented
The LLVM OMPD ompd_enumerate_icvs() and ompd_enumerate_states() functions do not conform to the OMPD v5.0 standard, because they return pointers to string constants, but the standard requires the strings be allocated with the memory allocation callback. If the tool attempts to release the string, it may crash or corrupt the heap.
jdelsign commented
The fix added to the ompd-devices-50 branch was incomplete because it did not allocate the string for the first state (omp_state_work_serial) on the host side. I attached a patch that fixes it.
llvm-ompd-issue-58.patch.txt