Skip to content

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Sep 19, 2025

Summary

This PR addresses community feedback on #48557 article + some cleanup

  1. Added more xrefs
  2. Inlined a couple of sub-bullets because they were not rendered nicely
  3. Added an example about RVA + AsPointer + ALC
  4. Non-zeroed fixed size buffers (see Fixed-size buffer is not zeroed runtime#119903 for more context)
  5. Reduced stackalloc size from int[512] to int[256] because previously we recommended to use 1024 bytes threshold
  6. added a new section 26. Compiler warnings

Internal previews

📄 File 🔗 Preview link
docs/standard/unsafe-code/best-practices.md docs/standard/unsafe-code/best-practices

@EgorBo
Copy link
Member Author

EgorBo commented Sep 19, 2025

@jkotas when you have a moment, could you please take a look at these changes?

EgorBo and others added 2 commits September 20, 2025 01:28
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

LGTM

@EgorBo EgorBo marked this pull request as ready for review September 22, 2025 12:29
@EgorBo EgorBo requested review from gewarren and a team as code owners September 22, 2025 12:29
@EgorBo
Copy link
Member Author

EgorBo commented Sep 22, 2025

cc @gewarren a quick follow-up to the previous PR

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

I love all the xrefs!

EgorBo and others added 2 commits September 22, 2025 18:41
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@gewarren gewarren merged commit 6d9c37e into main Sep 22, 2025
10 checks passed
@gewarren gewarren deleted the unsafe-code-guidelines-2 branch September 22, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants