Skip to content
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

Use snprintf in pal_icushim.c #92452

Merged
merged 3 commits into from
Sep 23, 2023
Merged

Use snprintf in pal_icushim.c #92452

merged 3 commits into from
Sep 23, 2023

Conversation

jkoritzinsky
Copy link
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
Copy link

ghost commented Sep 22, 2023

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
Copy link
Member

tarekgh commented Sep 22, 2023

@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
Copy link
Member

tarekgh commented Sep 22, 2023

@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
Member Author

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

Copy link
Member

@tarekgh tarekgh left a comment

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