Repository navigation
audit:mir is clean on the compiler's own source (#692) - #3422
Merged
Merged
Conversation
…local's type must be a type of the table (no error type reaches MIR, #692); a write to a place covers the places inside it, so a field assigned whole after one of its sub-fields was dropped is not reported as freed twice (ComptimeEvaluator.eval_workspace_capability_method); a Copy receiver of a consuming builtin method is copied, so a Copy field of a global read through unwrap() is no move out of the global (D52; zlib's configuration_table)
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.
with analyze src/main.w audit:mirreported one violation on main, and a second when the zlib corpus is compiled from source. Both are fixed, and the audit gains the cell #692 asks for.New cell (#692). A MIR local's type is a type of the table: the error type (0) or a slot that is no type id in a lowered body is a violation. None found.
A write to a place covers the places inside it.
record.pending_link_command = replacement, just after one sub-field was moved out and the rest dropped, was reported as "frees … again" at the whole value's drop:mark_placeupdated the assigned field's own entry and left its sub-fields' entries as dropped. The source was sound (ComptimeEvaluator.eval_workspace_capability_method). Test:nested_field_rewrite_verdict.A Copy receiver of a consuming builtin method is copied. It was marked
moveunless it had drop glue, sotable[i].f.unwrap()on a global table of C function pointers (zlib'sconfiguration_table[level].func.unwrap()) was a move out of a global, which D52 forbids. The program ran correctly; the MIR was invalid. Test:behav_copy_field_of_global_unwrapruns the program andaudit:miron it (fails before, passes after).Checks: full build,
:deep-debug-tool-tests,:drop-audit, battery,:release-checksall green.audit:mironsrc/main.wwith corpora from source: violations=0.#692 stays open for its context rules (sub-byte integers, aliases).