godot/tests
HP van Braam 240f510fa7 Core ubsan fixes
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.
2024-12-18 14:31:12 +01:00
..
core Core ubsan fixes 2024-12-18 14:31:12 +01:00
data Add half precision floating point support to StreamPeer 2024-11-12 08:46:52 -03:00
python_build SCons: Add method to generate raw cstrings 2024-07-31 14:22:04 -05:00
scene Merge pull request #100259 from Sauermann/proposal-right-click-cancel-drag 2024-12-11 17:35:39 -06:00
servers Change default Arabic font to Vazirmatn. 2024-12-05 16:26:52 +02:00
create_test.py [Tests] Improve argument description and snake_case name conversion of test generator script 2024-09-04 16:04:31 +02:00
display_server_mock.h
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
test_macros.cpp
test_macros.h Add tests for Projection 2024-11-27 11:09:10 +01:00
test_main.cpp Destroy EditorFilesystem/EditorSettings on test shutdown 2024-12-02 19:34:39 +01:00
test_main.h
test_tools.h
test_utils.cpp
test_utils.h
test_validate_testing.h