|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesfix_randlib.c_add_static (last revision 2013-11-01 10:09 UTC by dev at example dot org)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-28 00:23 UTC] uchiyama@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: uchiyama
[2016-05-28 05:21 UTC] uchiyama@php.net
-Status: Assigned
+Status: Closed
[2016-05-28 05:21 UTC] uchiyama@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ in the sources of the PECL extension stats 1.0.2 we need a 'static' storage class for the variable qinit: File: stats-1.0.2/randlib.c Function: void gsrgs(long getset,long *qvalue) Original Code: { long qinit = 0; Fixed Code: { /*MeJ: use static storage class ... otherwise the value assigned to qinit gets lost upon return from function gsrgs() */ static long qinit = 0; Reproduce code: --------------- <? stats_rand_setall ( 4711, 88888); $val = stats_rand_gen_gamma ( 0.6, 0.1 ); ?> Expected result: ---------------- $val should be assigned a random float value Actual result: -------------- X-Powered-By: PHP/4.4.5 Content-type: text/html INITGN called before random number generator initialized -- abort!