Bug #78878 [Opn->Fbk]: Buffer underflow in bc_shift_addsub

From: Date: Thu, 28 Nov 2019 16:02:31 +0000
Subject: Bug #78878 [Opn->Fbk]: Buffer underflow in bc_shift_addsub
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223918@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78878&edit=1 ID: 78878 Updated by: cmb@php.net Reported by: thomas-josef dot riedmaier at siemens dot com Summary: Buffer underflow in bc_shift_addsub -Status: Open +Status: Feedback Type: Bug Package: BC math related Operating System: Windows PHP Version: 7.4.0 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: I cannot reproduce the access violation (neither with the given code, nor when I replace the ² with 2, nor when I just remove the ²). And neither does the assertion trigger in a debug build for me (it won't trigger in release builds anyway). Could you please fix/clarify the test script? Previous Comments: ------------------------------------------------------------------------ [2019-11-28 15:03:45] thomas-josef dot riedmaier at siemens dot com Description: ------------ When executing the test snippet below, a buffer underflow occurs in bc_shift_addsub. I theory, bc_shift_addsub's assert statement would be triggered, but this does not play any role in the official windows release binaries https://windows.php.net/downloads/releases/php-7.4.0-Win32-vc15-x64.zip . Instead, on our test machines, an ACCESS_VIOLATION is triggered. Test script: --------------- <?php print bcmul(²6483605105519922841849335928742092, bcpowmod(2, 65535, -4e-4)); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78878&edit=1

« previous php.bugs (#223918) next »