Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0407-erts-Fix-match-spec-bug-in-matchEqFloat-on...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0407-erts-Fix-match-spec-bug-in-matchEqFloat-on-32-bit.patch of Package erlang
From f07eb53800f55889281f601e98b2a5c4da378bd8 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson <sverker@erlang.org> Date: Wed, 3 Feb 2021 15:38:01 +0100 Subject: [PATCH 07/34] erts: Fix match spec bug in matchEqFloat on 32-bit introduced by 40227c641ad468c481e9142fa09a227d323a013a. Also remove superfluous 0-word for matchEqFloat on 64-bit. --- erts/emulator/beam/erl_db_util.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index 6cb123d55e..e55b7bfc33 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -2224,7 +2224,7 @@ restart: FAIL(); if (sys_memcmp(float_val(*ep) + 1, pc, sizeof(double))) FAIL(); - pc += FLOAT_SIZE_OBJECT; + pc += sizeof(double) / sizeof(*pc); ++ep; break; case matchEqRef: { @@ -3687,9 +3687,7 @@ static DMCRet dmc_one_term(DMCContext *context, } case (_TAG_HEADER_FLOAT >> _TAG_PRIMARY_SIZE): DMC_PUSH2(*text, matchEqFloat, (Uint) float_val(c)[1]); -#ifdef ARCH_64 - DMC_PUSH(*text, (Uint) 0); -#else +#ifdef ARCH_32 DMC_PUSH(*text, (Uint) float_val(c)[2]); #endif break; @@ -5599,7 +5597,7 @@ void db_match_dis(Binary *bp) { double num; sys_memcpy(&num,t,sizeof(double)); - t += FLOAT_SIZE_OBJECT; + t += sizeof(double) / sizeof(*t); erts_printf("EqFloat\t%f\n", num); } break; -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor