From 2462c906b31a162ae3f4b13416399c2432632d2a Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Thu, 11 Jan 2024 02:01:23 +0100 Subject: [PATCH] Remove Herobrine Idk according to the changelog I already did this once but clearly I didn't so ??? --- RELEASE-NOTES.md | 2 +- .../GameController.Standalone.cs | 2 - Robust.Server/Program.cs | 2 - Robust.Shared/Utility/GlibcBug.cs | 42 ------------------- 4 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 Robust.Shared/Utility/GlibcBug.cs diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index e78a21c63..b7f9ab178 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -48,7 +48,7 @@ END TEMPLATE--> ### Other -*None yet* +* Removed glibc version check warning. ### Internal diff --git a/Robust.Client/GameController/GameController.Standalone.cs b/Robust.Client/GameController/GameController.Standalone.cs index f7f538263..37a8a1595 100644 --- a/Robust.Client/GameController/GameController.Standalone.cs +++ b/Robust.Client/GameController/GameController.Standalone.cs @@ -35,8 +35,6 @@ namespace Robust.Client throw new InvalidOperationException("Cannot start twice!"); } - GlibcBug.Check(); - _hasStarted = true; if (CommandLineArgs.TryParse(args, out var parsed)) diff --git a/Robust.Server/Program.cs b/Robust.Server/Program.cs index d711768f5..e25bd548c 100644 --- a/Robust.Server/Program.cs +++ b/Robust.Server/Program.cs @@ -32,8 +32,6 @@ namespace Robust.Server throw new InvalidOperationException("Cannot start twice!"); } - GlibcBug.Check(); - _hasStarted = true; if (!CommandLineArgs.TryParse(args, out var parsed)) diff --git a/Robust.Shared/Utility/GlibcBug.cs b/Robust.Shared/Utility/GlibcBug.cs deleted file mode 100644 index 747492f3e..000000000 --- a/Robust.Shared/Utility/GlibcBug.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using C = System.Console; - -namespace Robust.Shared.Utility; - -internal static unsafe class GlibcBug -{ - /// - /// Check for the glibc 2.35 DSO bug and log a warning if necessary. - /// - public static void Check() - { - if (!OperatingSystem.IsLinux()) - return; - - try - { - var versionString = Marshal.PtrToStringUTF8((IntPtr) gnu_get_libc_version()); - var version = Version.Parse(versionString!); - var badVersion = new Version(2, 35); - var fixedVersion = new Version(2, 37); - if (version >= badVersion && version < fixedVersion) - { - C.ForegroundColor = ConsoleColor.Yellow; - C.WriteLine($"!!!WARNING!!!: glibc {badVersion} or higher detected (you have {version})."); - C.WriteLine("If anything misbehaves (weird native crashes, library load failures), try setting GLIBC_TUNABLES=glibc.rtld.dynamic_sort=1 as environment variable."); - C.WriteLine("This is a severe glibc bug introduced in glibc 2.35. See https://github.com/space-wizards/RobustToolbox/issues/2563 for details"); - C.WriteLine("We cannot detect if you are susceptible or whether you have correctly applied the fix. This warning cannot be removed."); - C.ResetColor(); - } - } - catch - { - // Couldn't figure out glibc version, whatever. - // Hell maybe you're not even using glibc. - } - } - - [DllImport("libc.so.6")] - private static extern byte* gnu_get_libc_version(); -}