[Pkg-erlang-commits] r1974 - in erlang/trunk/debian: . patches
sgolovan at alioth.debian.org
sgolovan at alioth.debian.org
Sat Nov 25 20:33:02 UTC 2017
Author: sgolovan
Date: 2017-11-25 20:33:02 +0000 (Sat, 25 Nov 2017)
New Revision: 1974
Added:
erlang/trunk/debian/patches/wxgl.patch
Modified:
erlang/trunk/debian/changelog
erlang/trunk/debian/patches/series
erlang/trunk/debian/rules
Log:
[erlang]
* New upstream bugfix release.
* Applied a patch from upstream to fix crash in OpenGL applications like
wings3d (closes: #881156).
Modified: erlang/trunk/debian/changelog
===================================================================
--- erlang/trunk/debian/changelog 2017-11-21 19:54:52 UTC (rev 1973)
+++ erlang/trunk/debian/changelog 2017-11-25 20:33:02 UTC (rev 1974)
@@ -1,8 +1,10 @@
-erlang (1:20.1.6+dfsg-2) UNRELEASED; urgency=medium
+erlang (1:20.1.7+dfsg-1) unstable; urgency=medium
- * NOT RELEASED YET
+ * New upstream bugfix release.
+ * Applied a patch from upstream to fix crash in OpenGL applications like
+ wings3d (closes: #881156).
- -- Sergei Golovan <sgolovan at debian.org> Tue, 21 Nov 2017 22:54:51 +0300
+ -- Sergei Golovan <sgolovan at debian.org> Sat, 25 Nov 2017 23:15:07 +0300
erlang (1:20.1.6+dfsg-1) unstable; urgency=medium
Modified: erlang/trunk/debian/patches/series
===================================================================
--- erlang/trunk/debian/patches/series 2017-11-21 19:54:52 UTC (rev 1973)
+++ erlang/trunk/debian/patches/series 2017-11-25 20:33:02 UTC (rev 1974)
@@ -10,3 +10,4 @@
wx3.0-constants.patch
beamload.patch
x32.patch
+wxgl.patch
Added: erlang/trunk/debian/patches/wxgl.patch
===================================================================
--- erlang/trunk/debian/patches/wxgl.patch (rev 0)
+++ erlang/trunk/debian/patches/wxgl.patch 2017-11-25 20:33:02 UTC (rev 1974)
@@ -0,0 +1,52 @@
+From 823cab1ec24af0235195b14ee66a8642e4913699 Mon Sep 17 00:00:00 2001
+From: Dan Gudmundsson <dgud at erlang.org>
+Date: Tue, 17 Oct 2017 10:28:51 +0200
+Subject: [PATCH] Correct io_vec handling
+
+Can not depend on internal knowledge of binaries any more
+it changed and caused at least opengl to crash in OTP-20.1
+---
+ lib/wx/c_src/wxe_driver.c | 23 ++++++++++++++++-------
+ 1 file changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c
+index 5da71818e54..26ae3564e75 100644
+--- a/lib/wx/c_src/wxe_driver.c
++++ b/lib/wx/c_src/wxe_driver.c
+@@ -33,6 +33,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+
++#include <assert.h>
+ #include "wxe_driver.h"
+
+ #define TEMP_BINARY_SIZE 512
+@@ -234,13 +235,21 @@ standard_outputv(ErlDrvData drv_data, ErlIOVec* ev)
+ sd->max_bins = max;
+ }
+
+- if(ev->vsize == 2) {
+- binref->base = ev->iov[1].iov_base;
+- binref->size = ev->iov[1].iov_len;
+- binref->from = driver_caller(sd->port_handle);
+- bin = ev->binv[1];
+- driver_binary_inc_refc(bin); /* Otherwise it could get deallocated */
+- binref->bin = bin;
++ if(ev->size > 0) {
++ assert(ev->vsize == 2 && ev->iov[0].iov_len == 0
++ && "erts changed how the ErlIOVec is structured for outputv");
++ binref->from = driver_caller(sd->port_handle);
++ binref->size = ev->iov[1].iov_len;
++ if(ev->binv[1]) {
++ binref->base = ev->iov[1].iov_base;
++ bin = ev->binv[1];
++ driver_binary_inc_refc(bin); /* Otherwise it could get deallocated */
++ } else {
++ bin = driver_alloc_binary(ev->iov[1].iov_len);
++ memcpy(bin->orig_bytes, ev->iov[1].iov_base, ev->iov[1].iov_len);
++ binref->base = bin->orig_bytes;
++ }
++ binref->bin = bin;
+ } else { /* Empty binary (becomes NULL) */
+ binref->base = NULL;
+ binref->size = 0;
Modified: erlang/trunk/debian/rules
===================================================================
--- erlang/trunk/debian/rules 2017-11-21 19:54:52 UTC (rev 1973)
+++ erlang/trunk/debian/rules 2017-11-25 20:33:02 UTC (rev 1974)
@@ -501,7 +501,7 @@
binary: binary-indep binary-arch
-REL=20.1.6
+REL=20.1.7
DEB_REL=$(REL)+dfsg
get-orig-source:
More information about the Pkg-erlang-commits
mailing list