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 code may fail to initialize some structure members #59

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

Comments

@jdelsign
Copy link

I had seen the following problem (which I think may have been fixed already), but I think that it is worth reporting because the code may have similar problems elsewhere.

What I had seen is that the LLVM OMPD ompd_get_task_in_parallel() failed to initialize the _ompd_task_handle_s::lwt member, which causes a downstream failure in ompd_get_task_function(). I changed the TV memory allocation callback function to zero the block it returns to the library to fix some spurious failures.

After briefly poking around in the sources, I saw that the _ompd_task_handle_s::cuda_kernel_info has the same problem, and there were places where it is not initialized. However, I did not observe any failures as a result.

Suggestion: Since the library is written in C++ and some of the objects do have constructors, consider using "placement new" or adding class-specific operator new/delete methods.

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

No branches or pull requests

1 participant