Repository navigation
Conversation
|
I think this is correct, but I always get confused about marking request strings as persistent, so if @arnaud-lb could double check that would be great. |
|
@iliaal I think that doing it in There are a few dl()-only Lines 315 to 316 in 8844427 |
During a request, opcache's interned-string handlers return a plain persistent string when the name is not already in shared memory. dl() registers a temporary module's function, class and property names this way, so under ZEND_RC_DEBUG the first refcount change on one of them (building an argument TypeError, ReflectionFunction::getName(), get_object_vars()) trips the persistent-string assertion. The strings belong to the request's temporary module; mark them GC_PERSISTENT_LOCAL, but only while zend_rc_debug is off, as dl() turns it off, so the check keeps covering strings that may later be shared.
37bf0db to
f5793e8
Compare
|
Good point, thanks, a little bit ugly of a work-around but it makes sense especially given other use-cases |
Fixes the nightly LINUX_X64_VARIATION_DEBUG_ZTS failures of
frameless_temporary_opcache.phptand, on 8.5+,frameless_temporary.phpt. Names that dl() registers during a request come back from opcache's interned-string handlers as plain persistent strings, so the first refcount change on one trips the ZEND_RC_DEBUG assertion. They belong to the request's temporary module, so they are now marked GC_PERSISTENT_LOCAL while zend_rc_debug is off, as during dl(); release builds are unaffected.