You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlikely, although the false inclusions include cases like $(k\cdot k')\cdot\mathbb Z\not\subseteq k\cdot\mathbb N$. The effect of the bug would be that the union of the two modifiers discards the larger one, while keeping only the smaller one. This further requires that (1) $k'>1$ or that (2) the smaller one is learned later.
An affected program must feature some point where these modifiers join. I do not recall anything like this in the existing tests.
*x = 0
*x = *x + 1 // cyclic inclusion -> accelerated to Md[0, [1]]
r = *x
r = ite(nondet_bool(), nondet_int(), r) // joins Md[0, [-1]] with Md[0, [1]]
s = *(z + r + 1)
t = *(z + 0) // suddenly Md[1, [1]] cannot alias Md[0, []]
As a reaction to the Out-of-memory failure for Asm Tests, I reverted the semantic change of having an omnipotent null provenance. Instead, I gave this semantics to non-deterministic values. This did not solve all problems, though:
The SPIRV test spirv/vulkan/gpuverify/atomics/histo.spvasm is not supposed to find any data races. It contains the following snippet:
It accesses a static base with a non-deterministic index. The index guesses the difference between that base and the address of another object. The result points into that other object.
Solutions:
Let the alias results stay as strict as in development for tests like this.
Erase provenance of products like above.
Differentiate between non-deterministic values that can carry provenance and those that cannot.
Let alias results be as imprecise as they are in this PR, but the SMT-Solver will not find appropriate values to have them actually alias.
Add dynamic bounds-checks for Spir-V constructs like OpAccessChain. This says OOB is supposed to be UB.
Do not introduce the concept of addresses with arbitrary provenance. This includes the "conservative fallback" where a guaranteed null pointer dereference gets to alias everything.
As a reaction to the Out-of-memory failure for Asm Tests, I reverted the semantic change of having an omnipotent null provenance. Instead, I gave this semantics to non-deterministic values. This did not solve all problems, though:
I think neither the null object nor non-deterministic choice should have any provenance (accesses are always invalid).
It looks like this in our IR, where %gl_LocalInvocationID@T0 is initialized to a non-deterministic value:
If %gl_LocalInvocationID has a non-deterministic value, then the code is clearly buggy. I don't think this variable should be non-determinstic (it needs at least a constraint to force it into a valid range).
Do not introduce the concept of addresses with arbitrary provenance. This includes the "conservative fallback" where a guaranteed null pointer dereference gets to alias everything
The issue in the original benchmark was not may-aliasing but must-aliasing. I'm wondering if we can just tackle the must-aliasing part. Indeed, how much performance do we lose by disabling must-aliasing completely?
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
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.
Several regression tests and fixes to the alias analysis.
ModifierTrait.MdLinearmissed some inclusionshad spurious inclusions.ModifierTrait.SdLinearlost some overlaps when shrunk to an object's bounds.