Integers in Godot are signed 64-bit ints (int64_t), but var2str used
int behind the scenes and would thus overflow after 2^31.
Also properly documented the actual bounds of int and the behaviour
when overflowing them.
We need to consume the trailer part and final CRLF after last chunk
as per RFC 7230 section 4.1:
```
chunked-body = *chunk
last-chunk
trailer-part
CRLF
```
We do not return the trailer part, just consume it allowing following
requests to work as expected when using keep alive.
The allocations of commands in CommandQueueMT weren't aligned. This
commit aligns all accesses on 64bit boundaries regardless of target
platform. This ensures that all types are aligned.
Lock-wise the semaphores were maked as usable when the command had ran
but not when the synchronous stub had finished with it. This lead to a
race condition where sometimes the semaphore got reused before it was
waited on. We now mark the semaphore as free only once we're done
waiting on it.
-Changed Animation to have a special signal when tracks are changed, to avoid unnecesary track cache rebuilds in AnimationPlayer
-Added missing emit_changed whe modifying keys to Animation
-Changed AnimationPlayer to use the new refcounted connections instead of the previous hacky way to keep references
-Changed AnimationEditor to update the current track when keys are edited
-Fixed bug where undo/redo did not work with AnimationKeyEdit (was not being updated)
-Made sure UndoRedo does not mind deleted objects in undo/redo history, this would corrupt the history or clear it without need.
Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed.
Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems.
Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner).
It's now safe to replace the script instance without leaking or crashing.
Also fixed godot_icall_Object_weakref return reference being freed before returning.
This allows most demos to run without any ubsan or asan errors. There
are still some things in thirdpart/ and some things in AudioServer that
needs a look but this fixes a lot of issues. This should help debug less
obvious issues, hopefully.
This fixes#25217 and fixes#25218