Skip to content

Conversation

@shafik
Copy link
Collaborator

@shafik shafik commented Apr 5, 2025

Static analysis detected that Demangler::demangleStringLiteral had a potential overflow if not checking StringByteSize properly.

Added check to ensure that for wide string it is always even and that there were the byte count did not mismatch the actual size of the literal.

Fixes: #129970

…terals

Static analysis detected that Demangler::demangleStringLiteral had a potential
overflow if not checking StringByteSize properly.

Added check to ensure that for wide string it is always even and that there were
the byte count did not mismatch the actual size of the literal.

Fixes: llvm#129970

* Removed support for target intrinsics being defined in the target directories
themselves (i.e., the `TargetIntrinsicInfo` class).
* Fix Microsoft demanling of string literals to be stricter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Fix Microsoft demanling of string literals to be stricter
* Fix Microsoft demangling of string literals to be stricter

* Removed support for target intrinsics being defined in the target directories
themselves (i.e., the `TargetIntrinsicInfo` class).
* Fix Microsoft demanling of string literals to be stricter
([Fixes 129970](https://github.com/llvm/llvm-project/issues/129970))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
([Fixes 129970](https://github.com/llvm/llvm-project/issues/129970))
(#GH129970)

@shafik shafik merged commit d4c1642 into llvm:main Apr 7, 2025
12 checks passed
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.

Can StringByteSize in demangleStringLiteral in MicrosoftDemangle.cpp overflow?

3 participants