aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_mkliterals.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-01-03 17:09:40 +0100
committerGitHub <[email protected]>2018-01-03 17:09:40 +0100
commit93042b54da6a576b187bfb7b2222fc8a5a4d4f12 (patch)
tree63c351d2ce560f096a0655487ef5714dbbf2cedf /erts/emulator/hipe/hipe_mkliterals.c
parent0c08677522f1add0f6161328a0009e3ac3401f1e (diff)
parent898352fd68022432c1e6f8d9b7a926394d3e8899 (diff)
downloadotp-93042b54da6a576b187bfb7b2222fc8a5a4d4f12.tar.gz
otp-93042b54da6a576b187bfb7b2222fc8a5a4d4f12.tar.bz2
otp-93042b54da6a576b187bfb7b2222fc8a5a4d4f12.zip
Merge PR-1664 from sverker/sverker/hipe-bs_put_utf8-gc-bug OTP-14850
Fix GC bug for HiPE primop bs_put_utf8
Diffstat (limited to 'erts/emulator/hipe/hipe_mkliterals.c')
-rw-r--r--erts/emulator/hipe/hipe_mkliterals.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_mkliterals.c b/erts/emulator/hipe/hipe_mkliterals.c
index 4573980e1e..1ebe4e1188 100644
--- a/erts/emulator/hipe/hipe_mkliterals.c
+++ b/erts/emulator/hipe/hipe_mkliterals.c
@@ -535,6 +535,11 @@ static const struct rts_param rts_params[] = {
static unsigned int literals_crc;
static unsigned int system_crc;
+/*
+ * Change this version value to detect incompatible changes in primop interface.
+ */
+#define PRIMOP_ABI_VSN 0x090300 /* erts-9.3 */
+
static void compute_crc(void)
{
unsigned int crc_value;
@@ -550,6 +555,8 @@ static void compute_crc(void)
for (i = 0; i < NR_PARAMS; ++i)
if (rts_params[i].is_defined)
crc_value = crc_update_int(crc_value, &rts_params[i].value);
+
+ crc_value ^= PRIMOP_ABI_VSN;
crc_value &= 0x07FFFFFF;
system_crc = crc_value;
}