Skip to content

Conversation

cgewecke
Copy link
Member

In #854 (v0.8.7) logic was added to the collector that filters duplicate consecutive hashes because viaIR was doing that and messing up the hit counts.

However #863 reports a case where these duplicates are expected - they're inheriting onlyOwner and testing the implementation by switching the EOA e.g

 function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}

The instrumentation looks like:

function a() preCondition onlyOwner postCondition {}

...so running the failure and success case one after another gives

precondition  <-- tx #1
precondtion   <-- tx #2
postcondition

PR adds logic to make sure this filtering only happens within a single transaction (frame?) using program counter tracking.

@cgewecke cgewecke merged commit e6df717 into master Feb 25, 2024
@cgewecke cgewecke deleted the fix-duplicate-hash-logic branch February 25, 2024 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant