Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Fix problems with tag propagation from component to container #1142

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

hermanventer
Copy link
Contributor

Description

When a tag with TagPropagation::SuperComponent is attached to a value which is a component of one or more other values, those other values also get tagged.

This is difficult to do in the heap model, not only because pointer indirections are unidirectional, but also because environments in callees are not filled in with information from their callers.

The work around for the latter problem is to delay tag checks whenever possible. The work around for the former problem is to not rely on the tag operation to do the full propagation. I.e. only when has_tag! is applied to a container, will a full recursive traversal of the heap model be done to see if any value that is reachable from the container root is tagged.

Fixes #1131

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • API change with a documentation update
  • Additional test coverage
  • Code cleanup or just keeping up with the latest Rustc nightly

How Has This Been Tested?

./validate.sh
CI

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 23, 2022
@codecov
Copy link

codecov bot commented Mar 23, 2022

Codecov Report

Merging #1142 (01c072e) into main (4fe7492) will decrease coverage by 0%.
The diff coverage is 57%.

@@          Coverage Diff          @@
##            main   #1142   +/-   ##
=====================================
- Coverage     77%     77%   -1%     
=====================================
  Files         23      23           
  Lines      16086   16163   +77     
=====================================
+ Hits       12499   12513   +14     
- Misses      3587    3650   +63     
Impacted Files Coverage Δ
checker/src/constant_domain.rs 58% <ø> (+<1%) ⬆️
checker/src/expression.rs 63% <7%> (-7%) ⬇️
checker/src/crate_visitor.rs 74% <44%> (+<1%) ⬆️
checker/src/block_visitor.rs 80% <63%> (+1%) ⬆️
checker/src/options.rs 78% <74%> (+<1%) ⬆️
checker/src/call_visitor.rs 81% <75%> (+<1%) ⬆️
checker/src/body_visitor.rs 88% <78%> (-1%) ⬇️
checker/src/type_visitor.rs 74% <85%> (-1%) ⬇️
checker/src/path.rs 85% <90%> (+<1%) ⬆️
checker/src/abstract_value.rs 77% <91%> (-1%) ⬇️
... and 12 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@hermanventer hermanventer merged commit 6c307db into main Mar 24, 2022
@hermanventer hermanventer deleted the tag_prop branch March 24, 2022 00:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to verify tag when type changes
2 participants