[smuxi/stable] Server, Frontend-GNOME: fix Mono version detection for GC selection



commit cf63fc5fd2b1ad5ec344cb3d2a9e2aa1d7655bd4
Author: Mirco Bauer <meebey meebey net>
Date:   Tue May 16 09:29:35 2017 +0800

    Server, Frontend-GNOME: fix Mono version detection for GC selection
    
    The smuxi-server and smuxi-frontend-gnome start scripts incorrectly detect if
    Mono is version 4 or higher. The grep call uses a hardcoded version 4 check
    and thus Mono 5.x gets treated as it was Mono 3.x and thus it uses Boehm as GC
    instead of SGen. Since Boehm is no longer really maintained/supported this can
    lead easily to SEGVs on newer Mono versions. Now Boehm gets only enforced as GC
    if Mono is 3.x or lower == SGen gets used if Mono is 4.x or newer.
    
    Thanks goes to Llewelyn for reporting the issue on Mono 5.x

 src/Frontend-GNOME/smuxi-frontend-gnome.in |    2 +-
 src/Server/smuxi-server.in                 |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Frontend-GNOME/smuxi-frontend-gnome.in b/src/Frontend-GNOME/smuxi-frontend-gnome.in
index 0cdab2a..d27fdc7 100644
--- a/src/Frontend-GNOME/smuxi-frontend-gnome.in
+++ b/src/Frontend-GNOME/smuxi-frontend-gnome.in
@@ -7,7 +7,7 @@ export MONO_TLS_SESSION_CACHE_TIMEOUT
 
 # Mono >= 4 SEGVs with Boehm as GC during startup
 # see https://bugzilla.opensuse.org/show_bug.cgi?id=955080
-if ! mono -V | grep -q -F "version 4."; then
+if ! mono -V | grep -q -e "version [4-9]\."; then
     # HACK: forcibly disabled SGen, as it has a known SEGV bug related to the
     # Mono.Data.Sqlite binding that does not happen with the boehm GC, see:
     # https://smuxi.im/issues/show/1062
diff --git a/src/Server/smuxi-server.in b/src/Server/smuxi-server.in
index 419e4eb..2630b28 100644
--- a/src/Server/smuxi-server.in
+++ b/src/Server/smuxi-server.in
@@ -7,7 +7,7 @@ export MONO_TLS_SESSION_CACHE_TIMEOUT
 
 # Mono >= 4 SEGVs with Boehm as GC during startup
 # see https://bugzilla.opensuse.org/show_bug.cgi?id=955080
-if ! mono -V | grep -q -F "version 4."; then
+if ! mono -V | grep -q -e "version [4-9]\."; then
     # HACK: forcibly disabled SGen, as it has a known SEGV bug related to the
     # Mono.Data.Sqlite binding that does not happen with the boehm GC, see:
     # https://smuxi.im/issues/show/1062


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]