Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OMPD] The LLVM OMPD ompd_enumerate_icvs() and ompd_enumerate_states() functions do not allocate the strings they returns #58

Open
jdelsign opened this issue Feb 27, 2019 · 2 comments

Comments

@jdelsign
Copy link

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
Copy link
Author

jdelsign commented Apr 1, 2019

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

@jprotze
Copy link

jprotze commented Apr 9, 2019

@manorom can you please apply the patch and push?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants