Repository navigation
Fix batch: reflection, leaks, by-ref crashes, misc semantics - #207
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Batch of bug fixes from the open-issue backlog, grouped by root cause. Each fix has a regression case in
tests/aot/cases.Reflection and constants
defined()/constant()resolveClass::CONSTnames, including names built at run timeReflectionMethod->class/getDeclaringClass()name the declaring class (method row 72 → 80 bytes)getDefaultValue()works for plain-function parametersLeaks
+/+=) stored into an array element never releases the fresh result buffer. #193 array union stored into an element or property no longer double-retainsvar_exportreleases its stringtab()["len"]) leaks a copy of the whole array on every call. #125 by-ref return read in value or statement context (array returns) is released$o[$k]->p) never releases the returned object. #132$o[$k]->pon ArrayAccess releases the offsetGet resultforeachsnapshot copy is freed, typed elements includedSemantics and crashes
array_walk_recursiveand other by-ref builtins no longer mutate the caller's by-value arrayvar_dumpof a Closure, direct or nested, no longer segfaultsuse function name as aliasis not resolved: calling the alias throws "Call to undefined function" #180use function X as Yaliases resolveparse_urlscheme case, Stringablemixedinto string functionsAlso promotes the fixed repro for #85.
Known limits (left open)
tab()["len"]) leaks a copy of the whole array on every call. #125: a by-ref-return statement with string/object return still leaksTesting
-ksubsets for reflect, variadic, alias, spread, default, erased, byref, foreach, union pass;xfail.sh: 0 XPASS.