This allows Apple platforms to override the default stack size of
a thread in the WorkerThreadPool, which is 512KiB by default.
This must be increased, as SPIRV-Cross, used by the Metal driver, can
use deeply nested stacks, as can debug builds.
Time methods returning Strings with both date and time values included were calling vformat twice, as older vformat implementation limited how many arguments could be passed in. Updated these methods to just call vformat once.
By making sure that Thread always has a valid caller_id we can remove the
check making the function a straightforward getter instead.
In some quick tests we see a repeatable performance improvement of
somewhere around 0.32 mspf in TPS demo.
Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
Somehow it would still build fine, but would crash when compiled with GCC 12.2
on Debian 12.
Also re-add wrongly removed Mutex include from `thread_safe.h`, where it's used
in macros.
Add IWYU pragma comments to prevent it from mistakenly flagging those as unused.
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.
These fixes apply only to errors reported, and caused by, core/
The following things have been changed:
* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
the API cannot pass in wrongly-sized values leading to potential stack
corruption.
* Ensure that memcpy is never called with invalid or null pointers as
this is undefined behavior, and when the engine is built with
optimizations turned on leads to memory corruption and hard to debug
crashes.
* Replace enum values only used as static values with constexpr static
const values instead. This has no runtime overhead. This makes it so
that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
verify the new behavior. The behavior doesn't quite match master in
particulary for negative doubles as the original code tried to cast -inf
to an int. This then led to negative doubles losing all but one of
their decimal points when serializing. Behavior in GDScript remains
unchanged.
Updated key modifier mask and documented API change
Changed the old value
Changed the old value inside the .expected file
Resolved Conflicts
Moved changes to the end
Windows 11's major version number is actually 10.x.x, which can be confusing
if you don't know about this quirk. `OS.get_version_alias()` avoids this
by displaying the "branding" version number and the build number as a suffix,
so that individual updates can still be distinguished from each other.
On macOS, `OS.get_version_alias()` returns the version number prepended
with the version name (e.g. Sequoia for macOS 15).
On other operating systems, this returns the same value as `OS.get_version()`.