mingw builds missing templated C++ overloads for secure string functions
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: bugzilla, Unassigned)
Details
Attachments
(1 file)
The Microsoft CRT provides template magic for its secure string functions (the ones named with the "_s" suffix) that allow the compiler to infer the size of the output buffer.
MinGW also provides these, but only when the _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES
is defined. But that appears to be gated on MINGW_HAS_SECURE_API == 1
, which appears to be dependent on mingw's configure
settings?
I'm not 100% sure, but I'm leaning toward this being a configure
issue on our build machines as opposed to something that we can fix in the build system.
ni? Jacek for information. I'll move components if we can't do anything about this in our build system.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Those overloaded functions should be enabled in our builds:
https://hg.mozilla.org/mozilla-central/file/tip/taskcluster/scripts/misc/build-clang-trunk-mingw.sh#l114
It's possible that something is missing or they are not used for some functions that should use them. What's the exact problem that you noticed?
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Jacek Caban from comment #1)
It's possible that something is missing or they are not used for some functions that should use them. What's the exact problem that you noticed?
Comment 3•5 years ago
|
||
It's missing for _wcslwr_s, I sent a patch upstream.
Comment 4•5 years ago
|
||
I just pushed it to upstream repo. We just need to update used mingw-w64 now.
Comment 6•5 years ago
|
||
_wmakepath_s has overloads defined in wchar.h, but it's not duplicated in stdlib.h (and it probably should), so results may vary depending how it's used. We should probably get rid of this duplication like it's done in UCRT.
Comment 7•5 years ago
|
||
I pushed a patch to ensure that overloads are always defined. I also removed --enable-secure-api configure option and use of MINGW_HAS_SECURE_API macro to avoid future confusion. It's always enabled in mingw-w64 and we can remove it from our build script now.
Comment 8•5 years ago
|
||
This is needed to bring dispatherqueue.h in, which is needed for
an ANGLE upgrade.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d067e0360843
Bump mingw-w64 version r=froydnj
Comment 10•5 years ago
|
||
bugherder |
Description
•