Comments (8)
Thank you! Depending review time, this could be fixed in the next 8.3
from php-src.
I agree, or alternatively we should delay the error until the GC ends. In general I think we should delay errors handlers until a safe point is reached, like we do for timeouts and signals, but that's an other story.
I see that you were able to make a test for it. Was it able to reproduce the issue?
Yes it was
from php-src.
We are in RC for 8.3.4, but this should be included in 8.3.5
from php-src.
Thank you for this bug report!
Based on your GDB session we can figure that we are growing the buffer unnecessarily, as there are only 20K roots in it when gc_grow_root_buffer()
triggers the GC buffer overflow (GC disabled)
warning. I believe that #13572 fixes the root cause of this issue. Could you confirm that it fixes the issue for you?
The second issue is a side effect of triggering the GC buffer overflow (GC disabled)
warning: We execute PHP code during GC because of the error handler, which corrupts the GC state. This is a different issue that should be fixed separately.
from php-src.
Wow! Thanks so much for the quick response and fix! I will see if I can make time to test it today (probably tonight) as getting our application working in PHP 8.3 is a high priority for us.
I see that you were able to make a test for it. Was it able to reproduce the issue?
I was suspecting that there were two issues because the segfault was really confusing to me, but I was able to reproduce it consistently with the custom error handle. To me, it didn't look safe at all to run custom error handler in the middle of a garbage collector function.
from php-src.
To me, it didn't look safe at all to run custom error handler in the middle of a garbage collector function.
When I was thinking about it yesterday, I would have just disabled the ability to call custom error handling at all when entering garbage collector, then reenable it once garbage collector is finished. Maybe you have a better idea that would work.
from php-src.
I just did a quick test during lunch and that fix does pass our integration tests.
I still need to undo all of the changes I made to my Docker image that adds debug symbols and such, so I'm going to try rebuilding it again later tonight so that the PHP build is just like the official Docker image, but with that one fix.
from php-src.
I've done some more testing with not-debug builds, and the test passes just fine with your fix, #13572 .
Thank you! Do you know what version of PHP we could expect this fix?
from php-src.
Related Issues (20)
- mb_check_encoding is detecting SJIS as Windows-1252 in PHP 8.1 HOT 11
- Add `V` format specifier for formatting and `createFromFormat`
- PHP 8.4 | Implicitly nullable deprecation ignores null in constant expressions in default value HOT 6
- Bug empty() function HOT 19
- Array assignment fails when the array has been resized in error handler HOT 5
- appending function using spl_autoload_register() is not working, it is still prepending
- Off-by-one error in DateTime object memory usage? HOT 3
- `xsl` cannot build on PHP 8.4 HOT 1
- IntlDateFormatter::localtime() unexpectedly causes time zone to be changed if specified HOT 4
- Stack Overflow in zend_mm_alloc_small_slow in zend_alloc.c HOT 5
- Build ext separately in nightly
- Invalid `execute_data->opline` pointers in observer fcall handlers when JIT is enabled HOT 1
- DatePeriod not taking into account microseconds for end date HOT 1
- Unknown memory leak in PHP 8.2 FPM HOT 7
- Exclusive locks are not supported for this stream `php://stdout` HOT 4
- Magic methods for class comparison HOT 4
- is_file() returns false for files on locally mounted samba volume
- NumberFormatter class – USD text abbreviation displayed instead of currency symbol for locale Bulgaria (bg_BG) HOT 6
- Build failed at mbstring_arginfo.h on Windows(Visual C++) HOT 6
- Test failing in ext/fileinfo/tests/bug78987.phpt on big-endian PPC HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-src.