Repository navigation
Backlog sweep: 26 bugs across arrays, refs, leaks, language semantics and stdout - #546
Merged
Merged
Conversation
…static element is a cell (Fixes #514)
… longer flags; untrack tests/analyze/.work (Fixes #508)
… json_encode (Fixes #539)
…rld method table (Fixes #540)
…ct=shapes restores the error. Fixes #538
…ll off the end Fixes #542
…s in OwnershipFlow. Fixes #537
…un, not only the first (Fixes #502)
…rased, not the body-usage guess (Fixes #512)
…l array, not its masked pointer (Fixes #501)
…iter so a second initialisation throws Fixes #471
…of a new kind (Fixes #27)
… receiver A false|Box result reached the statically resolved Box::get dispatch and was dereferenced as an object. The existing cell-argument tag guard now also guards the receiver. Fixes #484
…cit_flush=1, unbuffered STDOUT) Fixes #544
…pying assign is not retained twice (Fixes #543)
…es and process spawns, and every 100 ms of echo (recovers echo throughput after #544)
… ID lookup from intl_timezone
…h outside the compile set (include.unresolved)
…off disk; document what runtime include supports (Fixes #545)
…yped by-ref param (#547)
#297) A function whose return was locked as assoc[string, assoc[string, unknown]] before a local settled never took the deeper concrete type, so callers walked real nested arrays under the stale claim: empty rows, SIGSEGV, double free.
…the socket once and answers false on a partial notification
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
Bug sweep over the open backlog: 26 issues closed, one partly. Grouped by area.
Crashes and wrong answers in arrays / refs / cells
===,==,<=>decode elements by the buffer hint when the static element is a cell.$a[$k] ??= $c ? $n->prop : f($n)SIGSEGVs once a later inference run erases $n to a cell. #502 value blocks retype from their last node on every inference run ($a[$k] ??= …).array_unique(array_map(closure)): a prelude callee fed an erased argument gets thevec[cell]floor.@param arrayparameter crashes in __mir_array_cow when reached through an untyped wrapper #493 anunknownbase strips the cell tag before__mir_array_cow.$a + $bover two barearrayparameters answers garbage. #517+over two barearrayparameters is an array union.array $aparam appended in the callee: crash / raw pointer / caller's array mutated #27 appending to a barearrayparameter whose buffer holds another element kind cellifies it first.unset()of a global reached through$GLOBALSreleases the boxed slot as a cell.Leaks
unknownremains anywhere in the element chain (nested array rows came back empty, crashed or double-freed; JSON descriptor of symfony-console).stream_select()loop grows by hundreds of MiB #543 the ownership plan and the emitter disagreed on whether$r = $setcopies when$ris passed by reference;stream_select()by-ref arrays are typed so the overwritten set is released.Language semantics
foreachover an object outside its class lists only visible properties.Call to a member function get() on false.int(0).define()inside functions, branches and expressions registers the constant at run time and returns true."${name}"interpolates; a double-quoted string inside{$…}is one token.json_encode(DateTime); get_class_methods() with a class-name string returns [] for a namespaced class #540get_class_methods($string).--strict=shapesrestores the error.--strict=<list>is shared bycompile,buildanddump-*;--analyze-strictstays as an alias.require/includeof a file that is not in the build silently returnsfalseat run time (PHP: fatal error forrequire), andcompiledoes not warn about it #545requireof a file that is not in the build throwsFailed opening required;includereturns false. New analyzer ruleinclude.unresolvedwarns at compile time.docs/differences.mdcorrected.I/O
echoandfwrite(STDOUT, …)are held in a 4 KiB stdio buffer when stdout is a pipe: logs arrive late, after later stderr lines, and are lost on SIGTERM #544echoandfwrite(STDOUT)no longer sit in a 4 KiB buffer. stdout is flushed before any blocking primitive, before a stderr write, on exit paths and after 100 ms; 1e6echostays at 0.20 s (macOS,php -n0.69 s).Tests
strict_types(weak-mode scalar coercion is not a finding);tests/analyze/.workis untracked.Known limits
send,sendto,writevand the offload worker's raw I/O do not flush first.includedoes not throw: there is no warning channel, and@include/include … orwould break.switchortrynow returns a cell (A function whose only return is an int literal, when it falls off the end, yields int(0) where php yields NULL. #542).Testing
tests/aot/run.sh -j 0: 2568 / 2570, 0 failed (macOS arm64).tests/cli,tests/analyze(25),tests/parser(111): green.tools/difftest.sh,tools/selfhost_fixpoint.sh, the Linux gate. The stdout change and the SIGTERM check were exercised on macOS only.Fixes #27, fixes #350, fixes #471, fixes #484, fixes #487, fixes #493, fixes #494, fixes #501, fixes #502, fixes #503, fixes #504, fixes #507, fixes #508, fixes #509, fixes #512, fixes #514, fixes #517, fixes #536, fixes #537, fixes #538, fixes #539, fixes #540, fixes #542, fixes #543, fixes #544, fixes #545, fixes #297, fixes #547. Refs #511.
CI
ci.ymlno longer makes Linux test shards wait for the slowest build: each target (arm64, amd64, alpine-arm64, alpine-amd64) is one call of the new reusablelinux-target.yml(build, 4 test shards, pdo-net, mysqli-net), so a fast target starts testing as soon as its own build is done. Required check names (linux-<tag>,macos-arm64) are unchanged; therowsjob matches shards by the newtarget-<tag> / test (prefix. Not yet exercised on GitHub: this PR's first CI run is the test.Also
#547
socket_select()leaked the caller's array on every call; its by-ref arrays are typed likestream_select()'s.