diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 0b2b59dc87..2121703b32 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2467,6 +2467,8 @@ void _Directory::_bind_methods() { _Directory::_Directory() { d = DirAccess::create(DirAccess::ACCESS_RESOURCES); + _list_skip_navigational = false; + _list_skip_hidden = false; } _Directory::~_Directory() { diff --git a/core/class_db.cpp b/core/class_db.cpp index 269ec667c0..fa5433bd06 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -248,6 +248,7 @@ ClassDB::ClassInfo::ClassInfo() { inherits_ptr = nullptr; disabled = false; exposed = false; + class_ptr = nullptr; } ClassDB::ClassInfo::~ClassInfo() { diff --git a/core/crypto/hashing_context.cpp b/core/crypto/hashing_context.cpp index bd55b03779..2c723bbcc4 100644 --- a/core/crypto/hashing_context.cpp +++ b/core/crypto/hashing_context.cpp @@ -129,6 +129,7 @@ void HashingContext::_bind_methods() { HashingContext::HashingContext() { ctx = nullptr; + type = HashType::HASH_MD5; } HashingContext::~HashingContext() { diff --git a/core/engine.cpp b/core/engine.cpp index b6af54877b..367729c927 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -237,6 +237,7 @@ Engine::Engine() { _frame_step = 0; editor_hint = false; _portals_active = false; + _occlusion_culling_active = false; } Engine::Singleton::Singleton(const StringName &p_name, Object *p_ptr) : diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index a7a6ae493b..1a640af9f8 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -375,6 +375,7 @@ Error FileAccessCompressed::_set_unix_permissions(const String &p_file, uint32_t FileAccessCompressed::FileAccessCompressed() : cmode(Compression::MODE_ZSTD), writing(false), + write_pos(0), write_ptr(nullptr), write_buffer_size(0), write_max(0), diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp index a0c534b472..4a3834036f 100644 --- a/core/io/file_access_encrypted.cpp +++ b/core/io/file_access_encrypted.cpp @@ -296,6 +296,8 @@ Error FileAccessEncrypted::_set_unix_permissions(const String &p_file, uint32_t FileAccessEncrypted::FileAccessEncrypted() { file = nullptr; + base = 0; + length = 0; pos = 0; eofed = false; mode = MODE_MAX; diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index 7e8823552a..8fb5652807 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -181,4 +181,6 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, uint64_t p_length) { FileAccessMemory::FileAccessMemory() { data = nullptr; + length = 0; + pos = 0; } diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index e30b59a6fd..68ea9c92e2 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -764,6 +764,7 @@ HTTPClient::HTTPClient() { chunk_trailer_part = false; response_num = 0; ssl = false; + ssl_verify_host = false; blocking = false; handshaking = false; // 64 KiB by default (favors fast download speeds at the cost of memory usage). diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp index fb014094f1..637923d46d 100644 --- a/core/io/packet_peer_udp.cpp +++ b/core/io/packet_peer_udp.cpp @@ -359,6 +359,8 @@ PacketPeerUDP::PacketPeerUDP() : udp_server(nullptr), _sock(Ref(NetSocket::create())) { rb.resize(16); + memset(recv_buffer, 0, sizeof(recv_buffer)); + memset(packet_buffer, 0, sizeof(packet_buffer)); } PacketPeerUDP::~PacketPeerUDP() { diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index ffb4eeb1df..5883141b3c 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -174,6 +174,7 @@ Error PCKPacker::flush(bool p_verbose) { PCKPacker::PCKPacker() { file = nullptr; + alignment = 0; }; PCKPacker::~PCKPacker() { diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 86c8904d14..2602312047 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -917,7 +917,9 @@ String ResourceInteractiveLoaderBinary::recognize(FileAccess *p_f) { ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() : translation_remapped(false), + ver_format(0), f(nullptr), + importmd_ofs(0), error(OK), stage(0) { } diff --git a/core/io/udp_server.cpp b/core/io/udp_server.cpp index f56fb431ef..4a586a6e54 100644 --- a/core/io/udp_server.cpp +++ b/core/io/udp_server.cpp @@ -195,6 +195,7 @@ void UDPServer::stop() { UDPServer::UDPServer() : _sock(Ref(NetSocket::create())) { + memset(recv_buffer, 0, sizeof(recv_buffer)); } UDPServer::~UDPServer() { diff --git a/core/math/a_star.h b/core/math/a_star.h index 4606ee1a24..23220501ce 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -46,8 +46,12 @@ class AStar : public Reference { struct Point { Point() : + id(0), + enabled(false), neighbours(4u), - unlinked_neighbours(4u) {} + unlinked_neighbours(4u), + prev_point(nullptr), + open_pass(0) {} int id; Vector3 pos; diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 17f223cd9d..02d9029203 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -2188,6 +2188,8 @@ void Expression::_bind_methods() { Expression::Expression() : output_type(Variant::NIL), sequenced(false), + str_ofs(0), + expression_dirty(false), error_set(true), root(nullptr), nodes(nullptr), diff --git a/core/math/expression.h b/core/math/expression.h index 2e76fa06c5..7f69beb460 100644 --- a/core/math/expression.h +++ b/core/math/expression.h @@ -218,7 +218,10 @@ private: Type type; - ENode() { next = nullptr; } + ENode() { + type = Type::TYPE_INPUT; + next = nullptr; + } virtual ~ENode() { if (next) { memdelete(next); @@ -240,6 +243,7 @@ private: int index; InputNode() { type = TYPE_INPUT; + index = 0; } }; @@ -257,6 +261,8 @@ private: OperatorNode() { type = TYPE_OPERATOR; + nodes[0] = nullptr; + nodes[1] = nullptr; } }; @@ -272,6 +278,8 @@ private: IndexNode() { type = TYPE_INDEX; + base = nullptr; + index = nullptr; } }; @@ -281,6 +289,7 @@ private: NamedIndexNode() { type = TYPE_NAMED_INDEX; + base = nullptr; } }; @@ -300,6 +309,7 @@ private: CallNode() { type = TYPE_CALL; + base = nullptr; } }; @@ -322,6 +332,7 @@ private: Vector arguments; BuiltinFuncNode() { type = TYPE_BUILTIN_FUNC; + func = BuiltinFunc::MATH_SIN; } }; diff --git a/core/object.h b/core/object.h index 220fa645d2..17fedb1c91 100644 --- a/core/object.h +++ b/core/object.h @@ -457,7 +457,10 @@ private: int reference_count; Connection conn; List::Element *cE; - Slot() { reference_count = 0; } + Slot() { + reference_count = 0; + cE = nullptr; + } }; MethodInfo user; diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index ad0be6cbf2..f95e565175 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -422,6 +422,7 @@ bool DirAccess::exists(String p_dir) { DirAccess::DirAccess() { _access_type = ACCESS_FILESYSTEM; + next_is_dir = false; } DirAccess::~DirAccess() { diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index a362d0f72b..dac0e78dbf 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -280,6 +280,7 @@ public: buffer(stack_buffer), capacity(sizeof(stack_buffer) / sizeof(char)), written(0) { + memset(stack_buffer, 0, sizeof(stack_buffer)); } _FORCE_INLINE_ void push_back(char c) { diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp index 7be91c6c23..3869a80fdb 100644 --- a/core/packed_data_container.cpp +++ b/core/packed_data_container.cpp @@ -396,4 +396,5 @@ int PackedDataContainerRef::size() const { }; PackedDataContainerRef::PackedDataContainerRef() { + offset = 0; } diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp index e9bb07f594..3003ea1283 100644 --- a/core/script_debugger_local.cpp +++ b/core/script_debugger_local.cpp @@ -384,6 +384,10 @@ void ScriptDebuggerLocal::send_error(const String &p_func, const String &p_file, ScriptDebuggerLocal::ScriptDebuggerLocal() { profiling = false; + frame_time = 0.0f; + idle_time = 0.0f; + physics_time = 0.0f; + physics_frame_time = 0.0f; idle_accum = OS::get_singleton()->get_ticks_usec(); options["variable_prefix"] = ""; }