Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  [erts, erl_interface] Replace MD5 implementation used
  • Loading branch information
rickard-green committed Nov 29, 2023
2 parents 5959c78 + 12b2474 commit 3348e03
Show file tree
Hide file tree
Showing 28 changed files with 2,215 additions and 720 deletions.
16 changes: 14 additions & 2 deletions erts/emulator/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,14 @@ else
LIBS += $(RYU_LIBRARY)
endif

DEPLIBS += $(OPENSSL_LIB)
ifeq ($(TARGET),win32)
LIBS += -L$(OPENSSL_OBJDIR) -l$(OPENSSL_LIB_NAME)
else
# Build on darwin fails if -l$(OPENSSL_LIB_NAME) is used
LIBS += $(OPENSSL_LIB)
endif

LIBSCTP = @LIBSCTP@

ORG_THR_LIBS=@EMU_THR_LIBS@
Expand Down Expand Up @@ -421,7 +429,8 @@ OBJDIR = obj/$(TTF_DIR)
CREATE_DIRS += $(OBJDIR) \
pcre/obj/$(TARGET)/$(TYPE) \
$(ZLIB_OBJDIR) \
$(RYU_OBJDIR)
$(RYU_OBJDIR) \
$(OPENSSL_OBJDIR)

ifeq ($(FLAVOR),jit)
CREATE_DIRS+=$(OBJDIR)/asmjit/ $(OBJDIR)/asmjit/core $(OBJDIR)/asmjit/$(JIT_ARCH)
Expand Down Expand Up @@ -491,6 +500,7 @@ endif
include zlib/zlib.mk
include pcre/pcre.mk
include ryu/ryu.mk
include openssl/openssl.mk

$(ERTS_LIB):
$(V_at)cd $(ERTS_LIB_DIR) && $(MAKE) $(TYPE)
Expand All @@ -504,6 +514,7 @@ clean:
$(RM) -r pcre/obj/$(TARGET) $(PCRE_GENINC)
$(RM) -r zlib/obj/$(TARGET)
$(RM) -r ryu/obj/$(TARGET)
$(RM) -r openssl/obj/$(TARGET)
$(RM) -r bin/$(TARGET)
cd $(ERTS_LIB_DIR) && $(MAKE) clean

Expand Down Expand Up @@ -793,6 +804,7 @@ COMMON_INCLUDES += -Izlib
endif
COMMON_INCLUDES += -Ipcre
COMMON_INCLUDES += -Iryu
COMMON_INCLUDES += -Iopenssl/include
COMMON_INCLUDES += -I../include -I../include/$(TARGET)
COMMON_INCLUDES += -I../include/internal -I../include/internal/$(TARGET)

Expand Down Expand Up @@ -1083,7 +1095,7 @@ RUN_OBJS += \
$(OBJDIR)/erl_trace.o $(OBJDIR)/copy.o \
$(OBJDIR)/utils.o $(OBJDIR)/bif.o \
$(OBJDIR)/io.o $(OBJDIR)/erl_printf_term.o\
$(OBJDIR)/erl_debug.o $(OBJDIR)/erl_md5.o \
$(OBJDIR)/erl_debug.o \
$(OBJDIR)/erl_message.o $(OBJDIR)/erl_proc_sig_queue.o \
$(OBJDIR)/erl_process_dict.o $(OBJDIR)/erl_process_lock.o \
$(OBJDIR)/erl_port_task.o $(OBJDIR)/erl_arith.o \
Expand Down
3 changes: 2 additions & 1 deletion erts/emulator/beam/beam_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "sys.h"
#include "erl_process.h"
#include "erl_md5.h"

/* Macros for manipulating locations. */
#define LINE_INVALID_LOCATION (0)
Expand All @@ -44,7 +45,7 @@
# define BEAM_NATIVE_MIN_FUNC_SZ 4
#endif

#define MD5_SIZE 16
#define MD5_SIZE MD5_DIGEST_LENGTH

typedef struct BeamCodeLineTab_ BeamCodeLineTab;

Expand Down
1 change: 1 addition & 0 deletions erts/emulator/beam/erl_bif_chksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "erl_binary.h"
#include "big.h"
#include "zlib.h"
#include "erl_md5.h"


typedef void (*ChksumFun)(void *sum_in_out, const byte *buf,
Expand Down
1 change: 1 addition & 0 deletions erts/emulator/beam/erl_bif_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "erl_alloc_util.h"
#include "erl_global_literals.h"
#include "beam_load.h"
#include "erl_md5.h"
#include "erl_iolist.h"

#ifdef ERTS_ENABLE_LOCK_COUNT
Expand Down
Loading

0 comments on commit 3348e03

Please sign in to comment.