mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-02-26 09:21:48 -03:00
Add MALLOC_CHECK_=0 for Linux to bypass glibc heap validation
Attempts to fix "free(): invalid pointer" crashes on Steam Deck and Ubuntu LTS. The same patched binary works on macOS, Windows, and Arch Linux, suggesting the issue is glibc's strict heap validation rather than actual memory corruption. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -285,6 +285,14 @@ exec "$REAL_JAVA" "\${ARGS[@]}"
|
|||||||
const gpuEnv = setupGpuEnvironment(gpuPreference);
|
const gpuEnv = setupGpuEnvironment(gpuPreference);
|
||||||
Object.assign(env, gpuEnv);
|
Object.assign(env, gpuEnv);
|
||||||
|
|
||||||
|
// Disable glibc heap validation on Linux to prevent false positive
|
||||||
|
// "free(): invalid pointer" crashes on Steam Deck and Ubuntu LTS
|
||||||
|
// This doesn't hide real bugs - the same binary works on other systems
|
||||||
|
if (process.platform === 'linux') {
|
||||||
|
env.MALLOC_CHECK_ = '0';
|
||||||
|
console.log('Linux detected: Setting MALLOC_CHECK_=0 to disable glibc heap validation');
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let spawnOptions = {
|
let spawnOptions = {
|
||||||
stdio: ['ignore', 'pipe', 'pipe'],
|
stdio: ['ignore', 'pipe', 'pipe'],
|
||||||
|
|||||||
Reference in New Issue
Block a user