summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-07-08 11:42:02 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2020-11-05 19:38:32 +0100
commitdbe3e730690176d96078abf0ca1e9756c8d903b2 (patch)
tree797220b39c82d6d3c8a26d638ed8347fcc23c172 /compiler
parent3c9f1cb62c48623c10543dad1325f797385366b7 (diff)
downloadvala-dbe3e730690176d96078abf0ca1e9756c8d903b2.tar.gz
Perform runtime version check of libvala
Fixes https://gitlab.gnome.org/GNOME/vala/issues/88
Diffstat (limited to 'compiler')
-rw-r--r--compiler/valacompiler.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala
index e5a6a21d1..4cc7b2967 100644
--- a/compiler/valacompiler.vala
+++ b/compiler/valacompiler.vala
@@ -622,6 +622,11 @@ class Vala.Compiler {
// initialize locale
Intl.setlocale (LocaleCategory.ALL, "");
+ if (Vala.get_build_version () != Vala.BUILD_VERSION) {
+ stderr.printf ("Integrity check failed (libvala %s doesn't match valac %s)\n", Vala.get_build_version (), Vala.BUILD_VERSION);
+ return 1;
+ }
+
if (Path.get_basename (args[0]) == "vala" || Path.get_basename (args[0]) == "vala" + Config.PACKAGE_SUFFIX) {
return run_source (args);
}