Skip to content

Use snprintf in pal_icushim.c - #92452

Merged
jkoritzinsky merged 3 commits into
mainfrom
icushim-snprintf
Sep 23, 2023
Merged

jkoritzinsky merged 3 commits into
mainfrom
icushim-snprintf

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

When AddressSanitizer is enabled on macOS, the toolchain deprecates sprintf. Switch to snprintf for better bounds checking and to help fix the macOS ASAN build.

When AddressSanitizer is enabled on macOS, the toolchain deprecates `sprintf`. Switch to `snprintf` for better bounds checking and to help fix the macOS ASAN build.
@ghost

ghost commented Sep 22, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

Issue Details

When AddressSanitizer is enabled on macOS, the toolchain deprecates sprintf. Switch to snprintf for better bounds checking and to help fix the macOS ASAN build.

Author: jkoritzinsky
Assignees: -
Labels:

area-System.Globalization

Milestone: 9.0.0

@tarekgh

tarekgh commented Sep 22, 2023

Copy link
Copy Markdown
Member

@jkoritzinsky could you please fix the error src/native/libs/System.Globalization.Native/pal_icushim.c(66,37): error GFC248B73: (NETCORE_ENGINEERING_TELEMETRY=Build) use of undeclared identifier 'MaxICUVersionStringLength'?

@tarekgh

tarekgh commented Sep 22, 2023

Copy link
Copy Markdown
Member

@jkoritzinsky does the AddressSanitizer is going to be enabled on .NET8.0 on macOS too? I am asking because we may need to port this to 8.0 release.

CC @jkotas

@jkoritzinsky

Copy link
Copy Markdown
Member Author

No, I am not going to enable AddressSanitizer on the 8.0 branch.

@tarekgh tarekgh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @jkoritzinsky!

@jkoritzinsky
jkoritzinsky merged commit b006c5f into main Sep 23, 2023
@jkoritzinsky
jkoritzinsky deleted the icushim-snprintf branch September 23, 2023 20:03
@ghost ghost locked as resolved and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants