Bug #73780 [Opn->Fbk]: Segfault on divide
| From: | cmb@php.net | Date: | Mon, 19 Dec 2016 13:31:04 +0000 |
| Subject: | Bug #73780 [Opn->Fbk]: Segfault on divide | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206132@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73780&edit=1
ID: 73780
Updated by: cmb@php.net
Reported by: gordon dot mcvey at ntlworld dot com
Summary: Segfault on divide
-Status: Open
+Status: Feedback
Type: Bug
Package: GNU MP related
Operating System: Mac OSX 10.11.6
PHP Version: 7.1.0
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
I can't reproduce on Linux either: <https://3v4l.org/RiLpo>.
Previous Comments:
------------------------------------------------------------------------
[2016-12-19 09:22:47] gordon dot mcvey at ntlworld dot com
Does seem to work in PHP 7.0 in Ubuntu 16.04 LTS, so it's possibly an issue with the Liip PHP
build for OSX
------------------------------------------------------------------------
[2016-12-18 20:41:08] gordon dot mcvey at ntlworld dot com
Oops, Lastpass decided the summary field was the username field.
------------------------------------------------------------------------
[2016-12-18 20:39:53] gordon dot mcvey at ntlworld dot com
FYI, php -i gives the following data about the GMP extension:
gmp
gmp support => enabled
GMP version => 5.1.1
------------------------------------------------------------------------
[2016-12-18 20:30:15] gordon dot mcvey at ntlworld dot com
Description:
------------
Any attempt to divide using GMP functions triggers a segmentation fault
Test script:
---------------
$a = gmp_init ("5");
$b = gmp_init ("2");
echo gmp_add ($a, $b) . PHP_EOL;
echo gmp_sub ($a, $b) . PHP_EOL;
echo gmp_mul ($a, $b) . PHP_EOL;
echo gmp_div_q ($a, $b) . PHP_EOL;
Expected result:
----------------
7
3
10
2, 2.5 or 3
Actual result:
--------------
7
3
10
Segmentation fault: 11
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73780&edit=1