Skip to content

[SYCL] Fix use-after-free for MockHandler::getKernelName() #18801

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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

Alexandr-Konovalov
Copy link
Contributor

@Alexandr-Konovalov Alexandr-Konovalov commented Jun 4, 2025

In current implementation, std::string is returned from getKernelName(). For preview, caller of getKernelName() creates std::string_view from the returned temporary string. This sting_view is used after the temporary string is destroyed. In the fix for preview std::string_view is returned, that points to same kernel name as handler::MKernel.

In current implementation, std::string is returned. For preview, caller
of getKernelName() creates std::string_view from the temporary string.
This sting_view is used after the temporary string is destroyed. In the
fix for preview std::string_view is returned, that points to same kernel
name as handler::MKernel.
@Alexandr-Konovalov Alexandr-Konovalov marked this pull request as ready for review June 4, 2025 09:05
@Alexandr-Konovalov Alexandr-Konovalov requested a review from a team as a code owner June 4, 2025 09:05
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

Successfully merging this pull request may close these issues.

2 participants