From 8e1c6fb7e26e0c339cecf971184083e96cce536d Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Jan 07 2020 22:57:37 +0000 Subject: Update moarvm to rev 23 via SR 761268 https://build.opensuse.org/request/show/761268 by user dimstar_suse --- diff --git a/.files b/.files index bb0b8bc..74b7f81 100644 Binary files a/.files and b/.files differ diff --git a/.rev b/.rev index 8f5d5d6..da4c784 100644 --- a/.rev +++ b/.rev @@ -176,4 +176,12 @@ Added information about the removal to the corresponding changelog entry. 752702 + + 8969a8deca0c18488d3c3cf8493201ae + 2020.01 + + dimstar_suse + + 761268 + diff --git a/MoarVM-2019.11.tar.gz b/MoarVM-2019.11.tar.gz deleted file mode 120000 index 900a540..0000000 --- a/MoarVM-2019.11.tar.gz +++ /dev/null @@ -1 +0,0 @@ -/ipfs/bafybeiavh3o47hqxrdce4bre7gas64fttsuwrlno6s2hmjqnughzebvfsi \ No newline at end of file diff --git a/MoarVM-2020.01.tar.gz b/MoarVM-2020.01.tar.gz new file mode 120000 index 0000000..e55f4d3 --- /dev/null +++ b/MoarVM-2020.01.tar.gz @@ -0,0 +1 @@ +/ipfs/bafybeihibeoj5hk2btjn4avpdoacppruzyj5ehgpd7q332elemxnsqz75q \ No newline at end of file diff --git a/MoarVM-buildroot-fix.diff b/MoarVM-buildroot-fix.diff deleted file mode 100644 index 2961659..0000000 --- a/MoarVM-buildroot-fix.diff +++ /dev/null @@ -1,81 +0,0 @@ -commit 610e05fa0f7e59b673fa3f4a525f940ec8a1fa98 -Author: Stefan Seifert -Date: Sun Dec 1 14:46:34 2019 +0100 - - Give upper layers a way to veto serializing a NativeCall's lib_name - - There are cases where we actually don't want the library's path to get - serialized into the bytecode file, e.g. when building a module into a Staging - repository for packaging. Give the upper layer a way to make us aware of that - by having them set the "serialize_lib_name" attribute on the native callsite. - -diff --git a/src/6model/reprs/NativeCall.c b/src/6model/reprs/NativeCall.c -index 208d7777c..053815411 100644 ---- a/src/6model/reprs/NativeCall.c -+++ b/src/6model/reprs/NativeCall.c -@@ -69,7 +69,7 @@ static void serialize(MVMThreadContext *tc, MVMSTable *st, void *data, MVMSerial - #ifndef HAVE_LIBFFI - MVMNativeCallBody *body = (MVMNativeCallBody *)data; - MVMint16 i = 0; -- MVM_serialization_write_cstr(tc, writer, body->lib_name); -+ MVM_serialization_write_cstr(tc, writer, body->serialize_lib_name ? body->lib_name : NULL); - MVM_serialization_write_cstr(tc, writer, body->sym_name); - MVM_serialization_write_int(tc, writer, body->convention); - MVM_serialization_write_int(tc, writer, body->num_args); -@@ -156,12 +156,42 @@ static MVMint64 get_int(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, vo - return (body->lib_handle ? 1 + (body->jitcode ? 1 : 0) : 0); - } - -+void bind_attribute(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data, MVMObject *class_handle, MVMString *name, MVMint64 hint, MVMRegister value, MVMuint16 kind) { -+ MVMNativeCallBody *body = (MVMNativeCallBody *)data; -+ char *c_name = MVM_string_utf8_encode_C_string(tc, name); -+ if (strcmp(c_name, "serialize_lib_name") != 0) { -+ char *waste[] = { c_name, NULL }; -+ MVM_exception_throw_adhoc_free( -+ tc, -+ waste, -+ "P6opaque: no such attribute '%s' on type %s when trying to bind a value", -+ c_name, -+ MVM_6model_get_debug_name(tc, class_handle) -+ ); -+ } -+ MVM_free(c_name); -+ -+ body->serialize_lib_name = value.u8; -+ -+} -+ -+void initialize(MVMThreadContext *tc, MVMSTable *st, MVMObject *root, void *data) { -+ MVMNativeCallBody *body = (MVMNativeCallBody *)data; -+ body->serialize_lib_name = 1; -+} -+ - static const MVMREPROps NativeCall_this_repr = { - type_object_for, - MVM_gc_allocate_object, -- NULL, /* initialize */ -+ initialize, - copy_to, -- MVM_REPR_DEFAULT_ATTR_FUNCS, -+ { -+ MVM_REPR_DEFAULT_GET_ATTRIBUTE, -+ bind_attribute, -+ MVM_REPR_DEFAULT_HINT_FOR, -+ MVM_REPR_DEFAULT_IS_ATTRIBUTE_INITIALIZED, -+ MVM_REPR_DEFAULT_ATTRIBUTE_AS_ATOMIC -+ }, - { - MVM_REPR_DEFAULT_SET_INT, - get_int, -diff --git a/src/6model/reprs/NativeCall.h b/src/6model/reprs/NativeCall.h -index ffcdcf779..150dc924c 100644 ---- a/src/6model/reprs/NativeCall.h -+++ b/src/6model/reprs/NativeCall.h -@@ -16,6 +16,7 @@ struct MVMNativeCallBody { - MVMint16 *arg_types; - MVMObject **arg_info; - MVMJitCode *jitcode; -+ MVMuint8 serialize_lib_name; - }; - - struct MVMNativeCall { diff --git a/moarvm-fix-segfaults-in-openssl.diff b/moarvm-fix-segfaults-in-openssl.diff new file mode 100644 index 0000000..3a1adc8 --- /dev/null +++ b/moarvm-fix-segfaults-in-openssl.diff @@ -0,0 +1,32 @@ +commit 105d09d62d80a62f40b0db2146eec1a09bfdfb37 +Author: Stefan Seifert +Date: Mon Jan 6 17:00:23 2020 +0100 + + Fix NativeCall libraries losing state during repossession + + Repossession of objects calls their gc_free. For NativeCall sites this + will lead to unloading the library. Doing so causes trouble as the + module may alreay have run some initialization call as is the case for + IO::Socket::Async::SSL. Even though we later load the library again, we + will run into issues. + Better to keep libraries loaded in the very theoretical case of some + program only referencing a native call for a while than to run into + segfaults. So remove the call to MVM_nativecall_free_lib until we have a + proper solution. + +diff --git a/src/6model/reprs/NativeCall.c b/src/6model/reprs/NativeCall.c +index 398e7da56..0eef99b11 100644 +--- a/src/6model/reprs/NativeCall.c ++++ b/src/6model/reprs/NativeCall.c +@@ -143,8 +143,11 @@ static void gc_cleanup(MVMThreadContext *tc, MVMSTable *st, void *data) { + MVMNativeCallBody *body = (MVMNativeCallBody *)data; + if (body->lib_name) + MVM_free(body->lib_name); ++/* FIXME don't free the library unconditionally, as the handle will be shared among NativeCall sites ++ * Also if we're called by repossession, we would use any initialized state of the library + if (body->lib_handle) + MVM_nativecall_free_lib(body->lib_handle); ++*/ + if (body->arg_types) + MVM_free(body->arg_types); + if (body->arg_info) diff --git a/moarvm.changes b/moarvm.changes index deaec46..f566580 100644 --- a/moarvm.changes +++ b/moarvm.changes @@ -1,4 +1,28 @@ ------------------------------------------------------------------- +Mon Jan 6 19:44:55 CET 2020 - nine@detonation.org + +- Add moarvm-fix-segfaults-in-openssl.diff fixing segfaulty regression + noticed too late for the release. + +------------------------------------------------------------------- +Sun Jan 5 10:58:58 CET 2020 - nine@detonation.org + +- update to version 2020.01 + ++ Fix relocatability of modules using NativeCall ++ Fix segfault caused by deopt all in NativeCall callback ++ Fix segfaults caused by JITed takehandlerresult returning NULL ++ Fix frame walker segfaults caused by deopt of a caller on a different thread ++ Fix memory corruption after cancelling signal ++ Allow getting absolute epoch startup time of VM in vmeventsubscribe ++ Add support for '−' (U+2212) minus for nqp::radix(_I) ++ Clean up MVM_io_resolve_host_name and make it more portable ++ Move to C99, compile with -Wall -Wextra and fix preexisting compiler warnings ++ Jit ordbaseat + +- Remove MoarVM-buildroot-fix.diff as the issue has been fixed upstream + +------------------------------------------------------------------- Sun Dec 01 15:15:00 CET 2019 - nine@detonation.org - Backport fix for buildroot in packaged files in MoarVM-buildroot-fix.diff diff --git a/moarvm.spec b/moarvm.spec index 16e9fc8..9054ff8 100644 --- a/moarvm.spec +++ b/moarvm.spec @@ -1,7 +1,7 @@ # # spec file for package moarvm # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%global mvrel 2019.11 +%global mvrel 2020.01 Name: moarvm Version: %mvrel Release: 2.1 @@ -27,7 +27,7 @@ URL: http://moarvm.org Source: http://moarvm.org/releases/MoarVM-%{mvrel}.tar.gz # PATCH-FIX-OPENSUSE boo#1100677 Patch0: reproducible.patch -Patch1: MoarVM-buildroot-fix.diff +Patch1: moarvm-fix-segfaults-in-openssl.diff BuildRequires: perl(ExtUtils::Command) %description