diff options
author | Remi Collet <remi@remirepo.net> | 2019-11-06 16:38:06 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-11-06 16:38:06 +0100 |
commit | de3467fef595940861a0825f5cbb41bf58106be7 (patch) | |
tree | cad2e2b2950734d64d434830e966209f154a437a | |
parent | bb1f286578c846fb4200e306dde8b5d01edee002 (diff) |
v1.0.1
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | php-pecl-scoutapm.spec | 11 | ||||
-rw-r--r-- | scoutapm-upstream.patch | 52 |
4 files changed, 7 insertions, 60 deletions
@@ -1,4 +1,4 @@ scoutapm -Version => 1.0.0 +Version => 1.0.1 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #201 scoutapm version 1.0.0 ] { +Extension [ <persistent> extension #201 scoutapm version 1.0.1 ] { - Functions { Function [ <internal:scoutapm> function scoutapm_get_calls ] { diff --git a/php-pecl-scoutapm.spec b/php-pecl-scoutapm.spec index 3ae0ac2..bd60786 100644 --- a/php-pecl-scoutapm.spec +++ b/php-pecl-scoutapm.spec @@ -17,14 +17,12 @@ Summary: Native Extension Component for ScoutAPM's PHP Agent Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.0.0 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 1.0.1 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz License: PHP URL: http://pecl.php.net/package/%{pecl_name} -Patch0: %{pecl_name}-upstream.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 7.1 BuildRequires: %{?scl_prefix}php-pear @@ -91,8 +89,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml pushd NTS -%patch0 -p1 - : Check version extver=$(sed -n '/#define PHP_SCOUTAPM_VERSION /{s/.* "//;s/".*$//;p}' zend_scoutapm.h) if test "x${extver}" != "x%{version}%{?prever}"; then @@ -225,6 +221,9 @@ TEST_PHP_EXECUTABLE=%{__ztsphp} \ %changelog +* Wed Nov 6 2019 Remi Collet <remi@remirepo.net> - 1.0.1-1 +- update to 1.0.1 + * Wed Nov 6 2019 Remi Collet <remi@remirepo.net> - 1.0.0-2 - test build with upstream patch for https://github.com/scoutapp/scout-apm-php-ext/issues/47 diff --git a/scoutapm-upstream.patch b/scoutapm-upstream.patch deleted file mode 100644 index 3513b94..0000000 --- a/scoutapm-upstream.patch +++ /dev/null @@ -1,52 +0,0 @@ -From edde934ede6f0d0f17c4e65f4c59ab06b7d43751 Mon Sep 17 00:00:00 2001 -From: James Titcumb <james@asgrim.com> -Date: Tue, 5 Nov 2019 15:57:29 +0000 -Subject: [PATCH] Fixes segfault that happens when arguments are looped over - too high - ---- - package.xml | 33 +++++++++++++++++++++++++-------- - tests/bug-47.phpt | 20 ++++++++++++++++++++ - zend_scoutapm.c | 2 +- - 3 files changed, 46 insertions(+), 9 deletions(-) - create mode 100644 tests/bug-47.phpt - -diff --git a/tests/bug-47.phpt b/tests/bug-47.phpt -new file mode 100644 -index 0000000..e15d34d ---- /dev/null -+++ b/tests/bug-47.phpt -@@ -0,0 +1,20 @@ -+--TEST-- -+Bug https://github.com/scoutapp/scout-apm-php-ext/issues/47 - fix segfault when accessing argument store out of bounds -+--SKIPIF-- -+<?php if (!extension_loaded("scoutapm")) die("skip scoutapm extension required."); ?> -+--FILE-- -+<?php -+$f1 = fopen(tempnam(sys_get_temp_dir(), 'scoutapm-test'), 'w+'); -+$f2 = tmpfile(); -+ -+fwrite($f2, "fread/fwrite test"); -+var_dump(scoutapm_get_calls()[0]['argv']); -+?> -+--EXPECTF-- -+Notice: fwrite(): ScoutAPM could not determine arguments for this call in %s -+array(2) { -+ [0]=> -+ resource(%d) of type (%s) -+ [1]=> -+ string(%d) "fread/fwrite test" -+} -diff --git a/zend_scoutapm.c b/zend_scoutapm.c -index 98058fe..8d29a08 100644 ---- a/zend_scoutapm.c -+++ b/zend_scoutapm.c -@@ -346,7 +346,7 @@ void record_arguments_for_call(const char *call_reference, int argc, zval *argv) - zend_long find_index_for_recorded_arguments(const char *call_reference) - { - zend_long i = 0; -- for (; i <= SCOUTAPM_G(disconnected_call_argument_store_count); i++) { -+ for (; i < SCOUTAPM_G(disconnected_call_argument_store_count); i++) { - if (SCOUTAPM_G(disconnected_call_argument_store)[i].reference - && strcasecmp( - SCOUTAPM_G(disconnected_call_argument_store)[i].reference, |