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

Problem with unsafe_trunc returning arbitrary values #288

Closed
kimikage opened this issue Apr 26, 2024 · 3 comments
Closed

Problem with unsafe_trunc returning arbitrary values #288

kimikage opened this issue Apr 26, 2024 · 3 comments
Labels

Comments

@kimikage
Copy link
Collaborator

kimikage commented Apr 26, 2024

I have dealt with the rem (more specifically unsafe_trunc) problem on ARM, mainly with PR #136, #223.
However, this code seems to cause bad problems under certain conditions. (cf. JuliaLang/julia#54264)

That is only likely to happen on ARM, but it can also happen on x86_64 (e.g., -1 % N0f8).

@kimikage kimikage added the bug label Apr 26, 2024
@kimikage
Copy link
Collaborator Author

It is better to switch to a safer implementation, even if it means sacrificing some speed. Also, it would be better to backport the fix to v0.8.

@kimikage
Copy link
Collaborator Author

Fortuitously, this issue number is the same as the issue number in ColorTypes.jl.😇
JuliaGraphics/ColorTypes.jl#288

@kimikage kimikage changed the title Problem with rem on ARM Problem with undefined behavior of unsafe_trunc Apr 27, 2024
@kimikage kimikage changed the title Problem with undefined behavior of unsafe_trunc Problem with unsafe_trunc returning arbitrary values Apr 28, 2024
@kimikage
Copy link
Collaborator Author

This was fixed by #291, but we need to backport it to v0.8 and release it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant