Skip to content

[🍒 swift/release/6.1] [lldb] Handle a byte size of zero in CompilerType::GetValueAsScalar (#123107) #9843

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

Merged

Conversation

JDevlieghere
Copy link

llvm#123107)

A bit or byte size of 0 is not a bug. It can legitimately (and frequently) happen in Swift and C, just not in C++. However, it doesn't make sense to read a scalar of zero bytes.

Currently, when this happens, we trigger an lldb_assert in the data extractor and return 0, which isn't accurate. I have a bunch of reports of the assert triggering, but nobody has been able to provide me with a reproducer that I can turn into a test and I wasn't able to concoct a test case by reverse-engineering the code.

rdar://141630334
(cherry picked from commit 8965dd4)

…lvm#123107)

A bit or byte size of 0 is not a bug. It can legitimately (and
frequently) happen in Swift and C, just not in C++. However, it doesn't
make sense to read a scalar of zero bytes.

Currently, when this happens, we trigger an `lldb_assert` in the data
extractor and return 0, which isn't accurate. I have a bunch of reports
of the assert triggering, but nobody has been able to provide me with a
reproducer that I can turn into a test and I wasn't able to concoct a
test case by reverse-engineering the code.

rdar://141630334
(cherry picked from commit 8965dd4)
@JDevlieghere JDevlieghere requested a review from a team as a code owner January 16, 2025 17:35
@JDevlieghere
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 29770a5 into swift/release/6.1 Jan 16, 2025
3 checks passed
@adrian-prantl adrian-prantl deleted the cherrypick-swift/release/6.1-8965dd40c63c branch January 16, 2025 21:41
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