From f69884d57341c7c8c76e9bc619b93bd4ecfa1cf4 Mon Sep 17 00:00:00 2001 From: r4sas Date: Sun, 18 Dec 2016 16:20:53 +0300 Subject: [PATCH 1/2] AVX disabled for debuild by patch --- Makefile | 9 +++++---- Makefile.linux | 2 ++ debian/patches/01-tune-build-opts.patch | 16 +++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 61220efd..acdc56d4 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,11 @@ DEPS := obj/make.dep include filelist.mk -USE_AESNI := yes -USE_STATIC := no -USE_MESHNET := no -USE_UPNP := no +USE_AESNI := yes +USE_AVX := yes +USE_STATIC := no +USE_MESHNET := no +USE_UPNP := no ifeq ($(WEBSOCKETS),1) NEEDED_CXXFLAGS += -DWITH_EVENTS diff --git a/Makefile.linux b/Makefile.linux index 6d4762b1..02f099d2 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -65,7 +65,9 @@ endif endif endif +ifeq ($(USE_AVX),yes) #check if AVX supported by CPU ifneq ($(shell $(GREP) -c avx /proc/cpuinfo),0) CPU_FLAGS += -mavx endif +endif diff --git a/debian/patches/01-tune-build-opts.patch b/debian/patches/01-tune-build-opts.patch index fba12f4e..4420d387 100644 --- a/debian/patches/01-tune-build-opts.patch +++ b/debian/patches/01-tune-build-opts.patch @@ -1,16 +1,18 @@ diff --git a/Makefile b/Makefile -index b6fc795..abc3ace 100644 +index bdadfe0..2f71eec 100644 + --- a/Makefile +++ b/Makefile @@ -9,10 +9,10 @@ DEPS := obj/make.dep include filelist.mk --USE_AESNI := yes -+USE_AESNI := no - USE_STATIC := no - USE_MESHNET := no - USE_UPNP := no +-USE_AESNI := yes ++USE_AESNI := no +-USE_AVX := yes ++USE_AVX := no + USE_STATIC := no + USE_MESHNET := no + USE_UPNP := no ifeq ($(WEBSOCKETS),1) - NEEDED_CXXFLAGS += -DWITH_EVENTS From 05c914156a572d2983b60863400267ccdfa6b100 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 18 Dec 2016 09:40:52 -0500 Subject: [PATCH 2/2] fixed session termination crash --- SAM.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SAM.cpp b/SAM.cpp index 84f8dbf6..1fc1227a 100644 --- a/SAM.cpp +++ b/SAM.cpp @@ -622,10 +622,16 @@ namespace client boost::asio::async_write (m_Socket, boost::asio::buffer (m_StreamBuffer, bytes_transferred), std::bind (&SAMSocket::HandleWriteI2PData, shared_from_this (), std::placeholders::_1)); // postpone termination else - Terminate (); + { + auto s = shared_from_this (); + m_Owner.GetService ().post ([s] { s->Terminate (); }); + } } else - Terminate (); + { + auto s = shared_from_this (); + m_Owner.GetService ().post ([s] { s->Terminate (); }); + } } else {