fix(core): apply core 64-bit and thread stability fixes - #242
Merged
Conversation
This file contains hidden or 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
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.
Objective
Apply critical core 64-bit & thread stability fixes discovered during the online services investigation.
Summary of Changes
This PR incorporates 4 independent stability and compatibility fixes onto
main:System Timer 64-Bit Truncation (
systimer.h):systimerGetMS(),SysTimeClass::Get(), and internal members (StartTime,WrapAdd) to explicitunsigned intreturn/variable types.TIMEGETTIMEvalues are stored in 32-bitunsigned intvariables, resolving prematureThreadClass::Stop()timeouts and shutdown segfaults.GadgetListBox 64-Bit Pointer Truncation (
GadgetListBox.cpp):GadgetListBoxSystemforGLM_GET_SELECTIONmessage.mData2toInt**to properly pass internal 64-bitlist->selectionspointer without truncating bits.POSIX Thread Cancellation Exception Handling (
abi::__forced_unwind):#if defined(_UNIX) && !defined(__APPLE__)guardedcatch (abi::__forced_unwind&) { throw; }blocks beforecatch (...)in GameSpy worker thread loops (BuddyThread,GameResultsThread,PeerThread,PersistentStorageThread,PingThread).abi::__forced_unwindon macOS libc++.Linux Deployment Scripts Static Library Check (
deploy-linux.sh/deploy-linux-zh.sh):libavcodec.sousingldd "${BINARY_SRC}" | grep -q "libavcodec.so".Commits Included
b810340b1fix(core): resolve 64-bit truncation bug in system timer5bae35508fix(ui): fix pointer truncation in GadgetListBox GetSelection for 64-bit systems41bebcb08fix(network): rethrow abi::__forced_unwind in GameSpy threads2e40f523dfix(deploy): handle static FFmpeg linkage gracefully in Linux deploy scriptsVerification
cmake --preset macos-vulkan.