Skip to content

[SYCL] Use after free when a default constructed accessor is used in a free function kernel #20505

@lbushi25

Description

@lbushi25

Describe the bug

As the title says, when using default-constructed in free function kernels, something goes wrong at runtime and we may sporadically end up with use after free of the memory that was occupied by the accessor which manifests often on GPU when run under memory sanitizers. This issue entails an investigation into why this is and a permanent fix of the issue.

As an example, the issue #20225 captures such a failure and is the only such failure known until now.
There is a workaround in the works for it at #20423 which will allow us to close that issue and remove the UNSUPPORTED directive in order to increase test coverage but it is not a fix of the issue in and of itself. That is to be done under this issue.

To reproduce

  1. Include a code snippet that is as short as possible
  2. Specify the command which should be used to compile the program
  3. Specify the command which should be used to launch the program
  4. Indicate what is wrong and what was expected

Environment

  • OS: Any
  • Target device and vendor: Any
  • DPC++ version: 4c83753
  • Dependencies version: [e.g. the output of sycl-ls --verbose]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions