-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Fix preprocessor guards for C99 format size specifiers #10020
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
Fix preprocessor guards for C99 format size specifiers #10020
Conversation
a8f4a16 to
7f1dfaa
Compare
37793b4 to
5fbffa2
Compare
|
I tried cherry-picking 81ea6a6 in the branch (based on 3.6) where I originally uncovered the issue. It fixed the windows -cmake tests but broke the the windows -shipped tests with lots of compile errors like: I can see that the windows -shipped tests are passing here, so perhaps I didn't cherry-pick correctly, or the problem I'm observing is specific to 3.6? (Unrelated: this is labeled "needs preceding PR" but I can't see a link to the preceding PR it needs in the description.) |
|
Ok, thanks. |
|
@bensze01 How is this progressing? This is needed for the TLS defragmentation work which is the top priority for 3.6.3 and the code freeze is next Friday (14 Mar) - hard deadline. If this can't be ready in time we can look for workarounds but we need to know. |
|
@mpg Sorry for the delay - it should be ready for review now. Will post the TF-PSA-Crypto pr in a moment. |
28a9276 to
d656263
Compare
Signed-off-by: Bence Szépkúti <[email protected]>
The Windows CRT treats any invalid format specifiers passed to the CRT as fatal assertion failures. Disable thie behaviour temporarily while testing if the format specifiers we use are supported. Signed-off-by: Bence Szépkúti <[email protected]>
Visual Studio 2013 (_MSC_VER == 1800) doesn't support %zu - only use it on 2015 and above (_MSC_VER >= 1900). %ldd works on Visual Studio 2013, but this patch keeps the two macro definitions together, for simplicity's sake. Signed-off-by: Bence Szépkúti <[email protected]>
These headers were necessary for compatibility with Visual Studio 2010, and interfere with the system headers on Visual Studio 2013+, eg. when building Mbed TLS using the .sln file shipped with the project. Move the still-required definition of "inline" to callconv.h, where the definition for GCC also lives. Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Signed-off-by: Bence Szépkúti <[email protected]>
Use a dummy definition of mbedtls_ms_time_t in builds without MBEDTLS_HAVE_TIME. Signed-off-by: Bence Szépkúti <[email protected]>
2a63cac to
d2933f0
Compare
d2933f0 to
d86ad8f
Compare
Signed-off-by: Bence Szépkúti <[email protected]>
d86ad8f to
24f11a3
Compare
gilles-peskine-arm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for simplifying the test data. LGTM
minosgalanakis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR fixes the preprocessor guards protecting the use of
%zuinMBEDTLS_PRINTF_SIZETIt also adds a non-regression test to
test_suite_debug.Fixes #10017
Unblocks #9976
PR checklist