-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use primitive type #91
Conversation
Pull Request Test Coverage Report for Build 190
💛 - Coveralls |
Pull Request Test Coverage Report for Build 199
💛 - Coveralls |
Looks good except for the AppVeyor failure… |
Bump — can we get CI working here? |
Sorry, I've just recently gotten a local Windows system for testing and I'm still getting used to the working in a Windows environment. Windows is passing Dec32 and Dec64 tests but failing many Dec128 tests. I think we may need to use primitive types for Dec32 and Dec64 while using |
Possibly related JuliaLang/julia#22649 The C typedef for Decimal128 has |
We could always remove that alignment in C. |
We may be able to do something similar to Quadmath.jl: |
Removing the alignment in C is probably the simplest. The only downside is potential loss of compatibility. |
I don't quite understand why this would cause a failure though, since a |
@yuyichao, do you have any thoughts on the alignment issues here? |
The commit message and comments above doesn't seem to give much context. From what I can guess from #90 the change in type is to match C ABI and the issue is crashes on windows? There are many possible issues and it's hard to say what it is without looking at where exactly the crash happens.
Instead of guessing, the simplest way is to just check the assembly code and possibly reproducing it with simpler functions. |
@yuyichao, would changing from a struct to a primitive type in Julia (for a 128-bit quantity) change the ABI on the Julia side? |
Yes. And depending on what the issue/question is, that's the (3) above. |
The C
The definition for Is
safe to use for The C compilers are whatever BinaryBuilder uses for cc on Linux, Windows, MacOS, FreeBSD on Intel, ARM, and PowerPC. |
In general, yes you can have an issue whenever your declaration doesn’t match the c one. The only way to guarantee the abi is correct ignoring compiler bug is to remove the align declaration since Julia does not yet support it. (That is, unless you want to write llvmcall, which is doable....) It is almost certainly possible you can find a type declaration that works for each arch and you just need to test it to make sure. With clang, you don’t even need to have access to all the environments since you can just cross compile and compare the generated llvm it. |
I'll submit a PR against DecFPBuilder to remove the ALIGN from the type declaration. |
Has anything been done in https://github.com/JuliaPackaging/Yggdrasil/blob/master/D/DecFP/build_tarballs.jl? |
I have a few more "easy" issues that I want to resolve, then I will look at this with issue #69. |
Rebased. |
Looks like this fixed the segmentation faults on 32-bit systems |
But now it's failing on 64-bit ARM? |
|
Codecov Report
@@ Coverage Diff @@
## master #91 +/- ##
==========================================
- Coverage 92.38% 90.74% -1.65%
==========================================
Files 1 1
Lines 420 432 +12
==========================================
+ Hits 388 392 +4
- Misses 32 40 +8
Continue to review full report at Codecov.
|
No description provided.