Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[herd] Unexpected(?) solver behaviour #635

Open
relokin opened this issue Sep 1, 2023 · 2 comments
Open

[herd] Unexpected(?) solver behaviour #635

relokin opened this issue Sep 1, 2023 · 2 comments

Comments

@relokin
Copy link
Member

relokin commented Sep 1, 2023

For the following litmus test:

AArch64 A
{
 [y]=1;
 0:X4=y;
 1:X6=(oa:PA(z)); 1:X1=PTE(y);
}
 P0          | P1          ;
L0:          | STR X6,[X1] ;
 LDR W3,[X4] |             ;
exists(0:X3=0)

herd7 produces only one execution:

States 1
0:X3=1;
No
Witnesses
Positive: 0 Negative: 1

when there should be two (0:X3=0 when the LDR in P0 reads PTE(y)=(oa:PA(z)). The problem seems to be that herd7 won't automatically add an initial write for z. A workaround is to explicitly initialize z (e.g., [z]=0;) or help herd7 add the default initialization for z (for example, 0:X0=z;).

This issue was reported by @chacon01.

@relokin
Copy link
Member Author

relokin commented Sep 1, 2023

I had a quick look at this and the solution I come up with is not straightforward, primarily because pteval is architecture specific. Is this a known issue that it was intentionally ignored?

@maranget
Copy link
Member

maranget commented Sep 3, 2023

Is this a known issue that it was intentionally ignored?

I would not say that exactly. But given that there is a simple workaround, as you write yourself. I may have run across the problem and worked around it...

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

No branches or pull requests

2 participants