uninitialized data

This commit is contained in:
Nikita Edel 2026-03-10 21:59:51 +01:00
parent 4e39635f20
commit 8865194e47
3 changed files with 17 additions and 2 deletions

View file

@ -10,6 +10,9 @@ UIGroup::UIGroup(EUIGroup group, int iPad)
m_bContainerMenuDisplayed = false;
m_bIgnoreAutosaveMenuDisplayed = false;
m_bIgnorePlayerJoinMenuDisplayed = false;
// 4jcraft, moved this to the top
// initialized memory was read.
m_viewportType = C4JRender::VIEWPORT_TYPE_FULLSCREEN;
m_updateFocusStateCountdown = 0;
@ -39,8 +42,6 @@ UIGroup::UIGroup(EUIGroup group, int iPad)
m_pressStartToPlay = (UIComponent_PressStartToPlay *)m_layers[(int)eUILayer_Tooltips]->addComponent(0, eUIComponent_PressStartToPlay);
}
m_viewportType = C4JRender::VIEWPORT_TYPE_FULLSCREEN;
// 4J Stu - Pre-allocate this for cached rendering in scenes. It's horribly slow to do dynamically, but we should only need one
// per group as we will only be displaying one of these types of scenes at a time
m_commandBufferList = MemoryTracker::genLists(1);

7
debug.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
meson setup build -Db_sanitize=address,leak,undefined -Dcpp_args=-fno-sanitize-recover=all -Dc_args=-fno-sanitize-recover=all && \
meson compile -C build && \
cd build/Minecraft.Client/ && \
gdb -tui ./Minecraft.Client && \
cd ../..

7
run.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
meson setup build -Db_sanitize=address,leak,undefined -Dcpp_args=-fno-sanitize-recover=all -Dc_args=-fno-sanitize-recover=all && \
meson compile -C build && \
cd build/Minecraft.Client/ && \
UBSAN_OPTIONS=print_stacktrace=1 ./Minecraft.Client && \
cd ../..