forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 1
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
[pull] master from godotengine:master #80
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: This commit ties the IPUnix to the UNIX_SOCKET_UNAVAILABLE define, disabling it when set. It is maybe not semantically correct (getifaddrs) is not part of the "socket" API, but it's reasonable to expect that a platform not supporting Unix-style sockets, would also not support other Unix network functions.
This makes the class available to avoid spam from classes using it, even if without any actual implementation (since raw sockets are not available on the web).
Include the needed .NET jar in the Godot templates so it's always available, then we don't need to include the jar from a .NET publish which could fail when exporting to multiple architectures because it would attempt to add the same jar for each architecture.
…preprocess time of 10 minutes
Fixes GridMap freeing edge connection debug mesh too early.
…h SDK 8.0.1xy And for CI, set up .NET SDK 8.0.100 explicitly to test our min supported version.
…state changes. This dramatically reduces the CPU time spent on rendering shadows for PointLight2Ds
… different parents
…ure and CSGMesh3D mesh If an invalid type is supplied (which can still be done from a script), a warning is printed (along with a workaround for ViewportTexture). This also adds support for "negative" resource hints such as "Texture2D,-ViewportTexture" to exclude one or more subclasses from a class hint. Co-authored-by: Tomasz Chabora <[email protected]>
Hide the custom template options behind the `Advanced Options` toggle
…ow-valid-types Only allow valid types in Decal, Light3D projector, PointLight2D texture and CSGMesh3D mesh
…ed_options Update the visibility for the custom templates for all platforms
Enable `BUTTON_FORWARD` and `BUTTON_BACK` mouse buttons on Android
Docs: Update AStar3D examples
SCons: Address minor `show_progress` issues
…on_editor Fix undo redo for the texture region editor
Improve run instances UX: avoid removing data and add a clear popup.
[Web] Implement dummy IP and NetSocket
Make `backward` be parameter of the `AnimationTree` in the `AnimationNodeAnimation`
Fix a command buffer leak that occurs in D3D12
Optimize PointLight2D shadow rendering by reducing draw calls and RD state changes
[.NET] Fix gradle builds for multiple ABIs
Fix Sync in BlendSpace1D/2D with BlendModeDiscrete
Fix GridMap freeing edge connection debug mesh too early
Fix errors when undoing collision generation for multiple meshes with different parents
…uild .NET: Downgrade Microsoft.CodeAnalysis.CSharp to 4.8.0 for compat with SDK 8.0.1xy
Update the warnings for CSGShape3D.
Fix Timer error on startup
My friends, gather around as I learned something about the C standard that is horrifying and may keep you, dear reader, up at night. My journey began trying to fix something entirely unrelated and not wanting to wait for ubsan builds when changing a testcase. So me, in my infinite naivete just built the engine with tests=yes, but optimizations turned on. This resulted in a segfault on "[Audio][AudioStreamWAV] Save empty file". Well, then, I thought. Lets built with asan then and find out where this happens! Would it surprise you, my fellow traveler, that the results were that no such crash occurred? Thus, to the debugger I go! Fearless, with great optimism. Where I find that through many an indirection the crash came because, somehow, CowData::_unref() was getting called with a _ptr set to 0x1. This can of course only end in tears. Or segmentation faults as we try to read an atomic variable at the somewhat inconveniently situated address at 0xfffffffffffffff0. So I went and looked at the likely culprit, blaming many an innocent recent change along the way. I shall spare you the falsly accused. But if for some reason you slept poorly last night, I can assure you that the voodoo dolls have been put away and will not be harmed further. So in AudioStreamWAV::get_data() we go, where we find a perfectly reasonable function! It checks to see whether or not its data is empty, and if it is not it will resize a temporary Vector to have data_bytes of space, after which it will do a perfectly pedestrian memcpy() and all is well in the world. Or so it seems! After many an hour of despair and disassembly I, at last, decided to look at where the data gets set! A breakthrough! Because of the padding data is never empty! So the code always runs! Eureka! One would think. But then, foolishly, I looked into the get_data() function one more. My mortal enemy was staring me in the face, laughing. Because it did not care about this. Sure, the check was worthless but still... What are we left with. At this point I could feel the method mocking me. "I resize the vector to 0, I then memcpy zero bytes into it." It said, DARING me to object to this state of affairs. And yet, if I changed the function to check for "data_bytes" rather than data.is_empty() no crashes. Was this a compiler bug? Am I losing my mind? But then... I remembered the mantra of the wise compiler druids... "It Is Not A Compiler Bug". But what then! The bug does not happen when memory is being watched! Valgrind agreed that while accessing the SafeRefCount at 0xfffffffffffffff0 was incredibly rude, it did not inform me of anything else untoward happening. So I read the memcpy() manpage... nothing... I read the the memcpy() posix spec... nothing. Finally, in despair and because I had nothing left to lose... The ISO C language specification. As I was reading, I could hear AudioStreamWAV::get_data() cackling, knowing that its time was up, but proud of the madness it caused in my soul. Knowing I would never be the same. The behavior is undefined if either dest or src is an invalid or null pointer. So... Here I stand before you, a broken person. But one richer in knowledge. I write you this from the depths of madness in the hopes that you, dear reader, can be spared this ordeal. May god have mercy on our souls. We trigger the following sequence of events: * memcpy(null, null, 0) is UB, thus dest and src cannot be null * we inline the calls to the ctor and dtor * now we have a function that does something that "proves" dest cannot be null * we inline cowdata::_unref() which does a null check, on something that the compiler just convinced itself cannot be null * the compiler removes the dead code branch where _ptr == nullptr * we start to do pointer arithmetic on a nullptr and get send to uninitialized memory. Co-Authored-By: Jason Beckmann <[email protected]>
Add `activate_feed` and `deactivate_feed` virtual bind to CameraFeed
Android: Support for `base color` retrieval
Reduce slider range for Particles preprocess to discourage setting a preprocess time of 10 minutes
Fix a crash trying to save an empty AudioStream
Implement `window_start_drag` on Windows and Linux.
Stop reporting contacts for sleeping bodies when using Jolt Physics
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )