-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
PkgId objects change by printing and returning from function #54599
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
Looking at the proposed fix it seems Julia is generating invalid code here, ouch |
oscardssmith
pushed a commit
that referenced
this issue
Jun 5, 2024
We currently cause a alias analysis contradiction by saying that the unionselbytes are on the stack, even if they are on a struct. LLVM is then able to figure out that we giving it a impossible alias situation (the object doesn't alias itself) and triggers UB. https://godbolt.org/z/ssEKMzsPf We may want to do a benchmarks run on this to see if anything too critical hasn't regressed. Fixes #54599 --------- Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com>
KristofferC
pushed a commit
that referenced
this issue
Jun 7, 2024
We currently cause a alias analysis contradiction by saying that the unionselbytes are on the stack, even if they are on a struct. LLVM is then able to figure out that we giving it a impossible alias situation (the object doesn't alias itself) and triggers UB. https://godbolt.org/z/ssEKMzsPf We may want to do a benchmarks run on this to see if anything too critical hasn't regressed. Fixes #54599 --------- Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> (cherry picked from commit 30542e0)
KristofferC
pushed a commit
that referenced
this issue
Jun 7, 2024
We currently cause a alias analysis contradiction by saying that the unionselbytes are on the stack, even if they are on a struct. LLVM is then able to figure out that we giving it a impossible alias situation (the object doesn't alias itself) and triggers UB. https://godbolt.org/z/ssEKMzsPf We may want to do a benchmarks run on this to see if anything too critical hasn't regressed. Fixes #54599 --------- Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> (cherry picked from commit 30542e0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running the following prints the UUID of Aqua as expected (on 1.10.3, 1.11.0-beta1, and b54dce2 (few days old master)):
However, if we move the printing into the function, makes the code behave differently in different julia versions:
output 1.10.3:
output 1.11.0-beta1:
output b54dce2 (few days old master):
If we add another print in there, the LoadError transforms into a segfault:
output 1.10.3:
output 1.11.0-beta1:
output b54dce2 (few days old master):
some device information:
all three julia versions are installed via juliaup
cc @fingolfin
The text was updated successfully, but these errors were encountered: