From 7625ca439e294c31817938dad46d06cd4510983f Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Sat, 8 Sep 2012 17:31:31 +0100 Subject: [PATCH 1/2] Check the debug stringbase when loading plugins, lest it be null and cause crashes down the line (bug 5478, r=dvander). --- sourcepawn/jit/BaseRuntime.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sourcepawn/jit/BaseRuntime.cpp b/sourcepawn/jit/BaseRuntime.cpp index 677d6ffd..7a07e58a 100644 --- a/sourcepawn/jit/BaseRuntime.cpp +++ b/sourcepawn/jit/BaseRuntime.cpp @@ -219,7 +219,11 @@ int BaseRuntime::CreateFromMemory(sp_file_hdr_t *hdr, uint8_t *base) return SP_ERROR_FILE_FORMAT; } - if ((plugin->flags & SP_FLAG_DEBUG) && (!(plugin->debug.files) || !(plugin->debug.lines) || !(plugin->debug.symbols))) + if ((plugin->flags & SP_FLAG_DEBUG) && ( + !(plugin->debug.files) || + !(plugin->debug.lines) || + !(plugin->debug.symbols) || + !(plugin->debug.stringbase) )) { return SP_ERROR_FILE_FORMAT; } From bed417dc625b258c9fb891e44a297a0d40703d92 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Sat, 8 Sep 2012 21:02:46 +0100 Subject: [PATCH 2/2] Include the auto-version file in the build, so 3rd party plugins compiled aginst the includes get useful versioning info (bug 5453, r=dvander). --- plugins/include/version.inc | 8 ++++---- tools/buildbot/PackageScript | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/include/version.inc b/plugins/include/version.inc index 92a55664..a3eb2988 100644 --- a/plugins/include/version.inc +++ b/plugins/include/version.inc @@ -35,9 +35,9 @@ #endif #define _version_included -#if defined SM_GENERATED_BUILD -#include -#else +#tryinclude + +#if !defined _auto_version_included #define SOURCEMOD_V_TAG "manual" #define SOURCEMOD_V_REV 0 #define SOURCEMOD_V_CSET "0" @@ -45,5 +45,5 @@ #define SOURCEMOD_V_MINOR 5 /**< SourceMod Minor version */ #define SOURCEMOD_V_RELEASE 0 /**< SourceMod Release version */ -#define SOURCEMOD_VERSION "1.5.0-manual" /**< SourceMod version string (major.minor.release.build) */ +#define SOURCEMOD_VERSION "1.5.0-manual" /**< SourceMod version string (major.minor.release-tag) */ #endif diff --git a/tools/buildbot/PackageScript b/tools/buildbot/PackageScript index cf7ed709..6141aab2 100644 --- a/tools/buildbot/PackageScript +++ b/tools/buildbot/PackageScript @@ -184,6 +184,9 @@ for plugin in disPlugins: os.path.join('addons', 'sourcemod', 'plugins', 'disabled'))) job.AddCommandGroup(commands) +job.AddCommand(CopyFile(os.path.join('..', 'includes', 'version_auto.inc'), + os.path.join('addons', 'sourcemod', 'scripting', 'include'))) + bincopies = [] def AddNormalLibrary(name, dest):