DIFF.BLOG
New Following Discover Jobs
More
Top Writers Suggest a blog Upvotes plugin
Report bug Contact About Privacy
Sign up
Topics
Follow your own topics →
Menu
New Following Discover Jobs Top Writers
More
Suggest a blog Upvotes plugin Report bug Contact About
Sign up
Privacy Policy
The home for great developer writing.
We surface the best developer writing from thousands of independent blogs, updated daily.
Join Diff.blog
TOPICS

Why does inadvertently passing a std::string instead of a char const* to a variadic function crash on x86-32 but not x86-64?

· Raymond Chen · Jan. 11, 2025, 5:58 a.m.
Old New Thing Code C++ Programming Concepts Variadic Functions x86 Architecture
Summary
This post addresses a technical issue regarding the behavior of variadic functions when passing a std::string instead of a char const* on different architectures (x86-32 vs x86-64). It discusses the calling conventions and small string optimization that lead to differing outcomes in function execution.
Read full post on devblogs.microsoft.com →
MORE POSTS LIKE THIS
C++ reminder: Function-local static variables are initialized only once, even if it looks like they get initialized multiple times
Raymond Chen · Sep 29, 2026
Old New Thing Code
The C# Class Handbook – Types of Classes with Code Examples
freeCodeCamp.org · Dec 20, 2024
C++ dotnet
Winning at the n-body benchmark
Fortran Lang Discourse · Nov 9, 2026
C++ programming-languages
TCAN4x5x: a hardware-agnostic Arduino library for the Texas Instruments TCAN4550 and TCAN4x5x CAN-FD controllers
Adafruit Industries Blog · Nov 10, 2026
Arduino electronics
parse_number() as a SQLite extension: C vs Rust
simonw · Nov 8, 2026
C++ Research
Microsoft Releases .NET 11
Paul Thurrott · Nov 10, 2026
Dev .NET
Discover more posts →
AUTHOR
RECENT POSTS FROM THE AUTHOR
Choose how you want to continue.
Continue with GitHub Continue with Google
By continuing, you agree to our Privacy Policy.