-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Update vswprintf to mussl 1.1.23 #9387
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
Conversation
@@ -27,6 +27,9 @@ vswoutput st-rts with 0x74 | |||
vsw continues with 0x65 | |||
vsw continues with 0x73 | |||
test string has 36 wide characters. | |||
PrintBigWide wrote 426 wchars: | |||
test string has 425 wide characters. |
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.
Note: difference in the above is expected, as "%d" is 2 chars, which gets printed as "425", which is 3 chars.
va_list args; | ||
va_start ( args, format ); | ||
wprintf(L"format starts with 0x%x\n", *(int*)format); | ||
wprintf(L"fmt continues with 0x%x\n", *(((int*)format) + 1)); | ||
wprintf(L"fmt continues with 0x%x\n", *(((int*)format) + 2)); | ||
int r = vswprintf ( buffer, 256, format, args ); | ||
int r = vswprintf ( buffer, MAX_CHARS_SMALL-1, format, args ); |
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.
Looking at the doco the second arg should be the (number of chars in buffer) -1, so I figured I should change that as well.
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.
Can you add a note to system/lib/libc/README.md
Note really sure what sort of thing I should be writing in that readme, but I took a crack at it. Is this the sort of thing you were after? |
Thanks @VirtualTim, lgtm. Restarted those jobs. Let's also see what @sbc100 thinks of the readme docs. |
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 % nits
Thanks for the review sbc100. I've added the suggested changes. |
Test failure was due to missing some exported functions, I think this is due from me merging in Incoming (I think the wasi changes).
|
These test failures are currently expected.. unless we release a new version of the emsdk which includes that latest fastcomp changes. |
I think merging in latest incoming will fix those errors. Then we can merge it. Sorry for the delay! |
system/lib/libc/README.md
Outdated
@@ -1,4 +1,5 @@ | |||
This folder contains the musl version of libc at `/musl`. The upstream version can be found at http://www.musl-libc.org/ | |||
This folder contains the musl version of libc at `/musl`. The upstream version can be found at http://www.musl-libc.org/. | |||
Most of the source comes from musl 1.1.15. Some is from older versions, but I'm assuming that this is because these files haven't changed between versions. |
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.
Can you drop this last sentence of re-phrase. The last update was indeed to 1.1.15 in #4813.
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.
Done.
Merge in latest incoming
Merged in the latest incoming, and now 2 SIMD tests are failing. |
Odd error - I saw it myself last night too. But it's not happening on incoming, and can't be related to this PR. Seems ok to land this. Thanks! |
Copy-pasted updated source from http://git.musl-libc.org/cgit/musl/tree/src/stdio/vswprintf.c. Also added a test case for this. Fixes emscripten-core#9305.
Copy-pasted updated source from http://git.musl-libc.org/cgit/musl/tree/src/stdio/vswprintf.c.
Also added a test case for this.
Fixes #9305.