-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed to run
bc_free_num()
before bc_num2str_ex()
whenever poss…
…ible When using `BCG`, when memory is exhausted, the refcount may not decrease as expected and a memory leak may occur.
- Loading branch information
1 parent
c42f48d
commit d377b1d
Showing
2 changed files
with
78 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--TEST-- | ||
GH-17398 (bcmul memory leak) | ||
--EXTENSIONS-- | ||
bcmath | ||
--FILE-- | ||
<?php | ||
bcmul('0', '0', PHP_INT_MAX); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Allowed memory size of %d bytes exhausted%s(tried to allocate %d bytes) in %s on line %d |