Skip to content

[OMPD] The LLVM OMPD code may fail to initialize some structure members #59

Open
@jdelsign

Description

@jdelsign

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions