-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
math: add LDC restritions on usage of x87 extensions #8323
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @ljmf00! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#8323" |
This patch adds some restrictions if the library is compiled with LDC compiler targeting MSVC C runtime. Partially cherry picked from: https://github.com/ldc-developers/phobos Co-authored-by: Martin Kinkelin <[email protected]> Signed-off-by: Luís Ferreira <[email protected]>
afaaca9
to
2e3a70b
Compare
More details please, and why upstreaming some ugliness from LDC is needed here. This could simpler when moving away from |
I have talked about this in a forum thread, maybe we can discuss this more in depth, in a separate one. The idea would be to add the possibility of fuzzing the official standard library or at least making it simpler. We don't have anything set up on Google oss-fuzz and we should start worrying about it. If we want to have a secure implementation, we should not only fuzz the official standard library but also run the test suite against ASAN/UBSAN, and this is a step forward towards that.
Is the behaviour of |
I'm not sure what the goal is - getting upstream Phobos here to be usable and testable with the current LDC and LDC's druntime version? That's a much bigger task. I've been hesitant to upstream pure LDC specifics; stuff that is also interesting for GDC is a different topic. [And much of that has only recently been enabled, by LDC supporting the GDC/GCC inline asm syntax.]
We currently have 3/4 As for |
In case I misunderstood - the ugliness comes from defining extra helper static if (real.mant_dig == 64)
version = abc; // Error: version `abc` defined after use
version (abc) void foo() {} So that would require moving from versions to private enums and static-ifs. |
Oh, I understand. Is there any compiler issue about it I can reference here, or is this supposed to be the intended behaviour and perhaps a language limitation? If it is a compiler error, I can stale this and try to fix it. |
I marked this as draft due to |
This related to: #7668 |
This patch adds some restrictions if the library is compiled with LDC compiler
targeting MSVC C runtime.
Partially cherry picked from: ldc-developers/phobos
We need this if we want to go forward with compiling and running the test suite with sanitization and heuristic-based fuzzing.
CC @kinke