-
Notifications
You must be signed in to change notification settings - Fork 797
[GDB] Fix pretty-printer crash for sycl::item MOffset #19683
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
base: sycl
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a crash in the GDB pretty-printer for sycl::item
objects when the MOffset
field is not available. The fix adds exception handling to gracefully skip offset printing when the offset feature has been disabled (as deprecated in SYCL 2020).
- Adds try-catch block around offset field access and printing logic
- Prevents crashes when
MOffset
field is not present insycl::item
impl - Maintains backward compatibility for items with offset enabled
Do you know if it's feasible to add a test for this change? I don't recall seeing tests for |
Looks like we don't have any testing for Should I still go about updating said file to contain |
Yes |
I added a check in |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The pretty printer looks for an
MOffset
field insycl::item
impl without considering whether or not offset has been enabled (Offset was deprecated in SYCL 2020): Add a check to avoid printingMOffset
if offset has been disabled.