fix: Disable sentry URL patching to prevent crash

The sentry URL string appears to be near executable code in the binary.
Patching it may corrupt memory layout on glibc 2.41+ systems.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
sanasol
2026-01-27 05:19:34 +01:00
parent 219b50a214
commit 24a919588e

View File

@@ -238,20 +238,21 @@ class ClientPatcher {
console.log(` Patching strategy: ${strategy.description}`);
// 1. Patch telemetry/sentry URL
const oldSentry = 'https://ca900df42fcf57d4dd8401a86ddd7da2@sentry.hytale.com/2';
const newSentry = `${protocol}t@${domain}/2`;
const sentryResult = this.replaceBytes(
result,
this.stringToLengthPrefixed(oldSentry),
this.stringToLengthPrefixed(newSentry)
);
result = sentryResult.buffer;
if (sentryResult.count > 0) {
console.log(` Patched ${sentryResult.count} sentry URL(s)`);
totalCount += sentryResult.count;
}
// 1. Patch telemetry/sentry URL - DISABLED: May cause crash on glibc 2.41+
// The sentry string is near executable code and patching it may corrupt memory layout
// const oldSentry = 'https://ca900df42fcf57d4dd8401a86ddd7da2@sentry.hytale.com/2';
// const newSentry = `${protocol}t@${domain}/2`;
// const sentryResult = this.replaceBytes(
// result,
// this.stringToLengthPrefixed(oldSentry),
// this.stringToLengthPrefixed(newSentry)
// );
// result = sentryResult.buffer;
// if (sentryResult.count > 0) {
// console.log(` Patched ${sentryResult.count} sentry URL(s)`);
// totalCount += sentryResult.count;
// }
console.log(` Skipping sentry patch (stability fix)`);
// 2. Patch main domain (hytale.com -> mainDomain)
const domainResult = this.replaceBytes(