-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix clobbering RBX register in LTO mode within ZSTD_cpuid #3646
Conversation
Just rewrite assembly to using std intrinsics for all compilers. It doing right thing by default (e.g. preserving aftermentioned register). Bug actually was caught on certain Japan's console in LTO mode (PIC is also turned on) but I suspect that same would be true for other platforms as well (e e.g. Linux+PIC+LTO)
Hey @virt00l, thanks for the report! We port our implementation from I'd like to keep our implementation as close as possible to upstream. Could you try applying a C equivalent of this commit and see if it fixes your issue? |
I don't have time to do it verbatim right now, but it seems that it's indeed very likely that it does.
|
Thanks! I will backport that fix, and link the PR here. It would be great if you could confirm if it fixes your issue when you get a chance. |
Backport folly fix for rbx clobbering: facebook/folly@f22f88b This supercedes PR facebook#3646.
Backport folly fix for rbx clobbering: facebook/folly@f22f88b This supercedes PR facebook#3646.
Backport folly fix for rbx clobbering: facebook/folly@f22f88b This supercedes PR facebook#3646.
Backport folly fix for rbx clobbering: facebook/folly@f22f88b This supercedes PR #3646.
Backport folly fix for rbx clobbering: facebook/folly@f22f88b This supercedes PR facebook#3646.
Just rewrite assembly to using std intrinsics for all compilers. It doing right thing by default (e.g. preserving aftermentioned register).
Bug actually was caught on certain Japan's console in LTO mode (PIC is also turned on) but I suspect that same would be true for other platforms as well (e e.g. Linux+PIC+LTO)