-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
Bug in MPIR 2.1.1 in mpz_divexact() #9837
Comments
comment:1
This line from the PARI source code (src/kernel/gmp/mp.c:952) says it all:
Changing that to a zero solves the problem. |
comment:2
Replying to @jdemeyer:
:D Thanks, I didn't want to track this down further... Funny, because GMP (5.0.1) dropped other things not part of the public interface, which are still available in the newest MPIR. |
comment:3
P.S.: Yet another major single-character patch... ;-) |
This comment has been minimized.
This comment has been minimized.
comment:5
Should we patch it to
rather than
? |
comment:6
It's actually an MPIR issue, I will report it to the MPIR people. The following MPIR program gives a Segmentation Fault:
|
This comment has been minimized.
This comment has been minimized.
Upstream: Reported upstream. Little or no feedback. |
comment:8
Cross-replying to jdemeyer:
Yes. I intended to simply change the Then in case somebody wanted to enable PARI's use of "whatever" (see below), he could simply add
I haven't checked this. To me, it is rather irrelevant if they are documented or not, but rather whether they are part of the official / public interface to GMP. If those features PARI uses aren't, we should IMHO disable their use by default. So correct me if my assumption is false; I'll perhaps later take a closer look at what PARI considers "undocumented" (but not at the moment...). The odd thing is that the
Since we already patch We can then easily enable or disable the use in The remaining question would be whether to enable or disable it by default. With MPIR the Sage standard package, I preferred the latter.
I don't know if "with this" referred to the PARI spkg, the ticket (#9343), or PARI in general... ;-) I'll again ask at #9343 if anyone plans to add doctests or at least missing docstrings (to the Sage library part of PARI / #9343). I am not..., only perhaps going to fix the Sphinx warnings. |
comment:9
Replying to @nexttime:
I believe the Sphinx warnings come from #9400 and I will fix these when I have time. |
comment:10
Replying to @nexttime:
This is how the MPIR documentation phrases the internals used by PARI:
Well, it depends because in this case, using the internals means a potentially significant speed gain.
The only thing I'll do is release a new prealpha when PARI p5 is out and to fix the few remaining issues in #9400. |
comment:11
This got filed as "reported upstream, little or no feedback". How did it get reported originally, because I only received the report yesterday, and since then there are five or six replies on the MPIR devel list. Anyhow, just to update, it looks like we found the bug in MPIR. Just have to patch it now. With regard to the "undocumented interface", if Pari currently builds against MPIR without missing symbol errors, then it is likely that it is relying on now documented symbols in both GMP and MPIR. The disclaimer is out-of-date. It has been removed in the GMP manual, but we have forgotten to remove it in the MPIR manual. I will make a note on the MPIR devel list to do so. If there are missing symbol errors, then I guess it relied on undocumented functions in GMP but not in MPIR. That would be a different (but surprising) situation. |
comment:12
Just to save someone writing a response, this was originally reported to thempirteam email address, which because of technical problems was not being accessed. So, it was reported in the correct way, 6 days ago, and there would have indeed been little to no response over that time due to hardware issues. Sorry for the noise. |
Changed upstream from Reported upstream. Little or no feedback. to Reported upstream. Developers acknowledge bug. |
Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release. |
This comment has been minimized.
This comment has been minimized.
Changed upstream from Fixed upstream, but not in a stable release. to Completely fixed; Fix reported upstream |
comment:15
What does "needs review" mean? Confirming that PARI uses documented GMP features? Or that it's an MPIR bug? I'd say we (i.e. the release manager) can close this ticket as "fixed". #8664 should not be merged until there's MPIR 2.1.2 or alike with this bug fixed; I think we agreed on that. |
comment:16
Positive review for the fact that it is an MPIR bug which has been fixed upstream. |
This comment has been minimized.
This comment has been minimized.
Author: Leif Leonhardy, Jeroen Demeyer |
comment:18
Feel free to edit the "Author(s)" and "Reviewer(s)" fields. |
Reviewer: Leif Leonhardy, Jeroen Demeyer |
Due to a bug in MPIR 2.1.1, combining #9343 (new PARI) and #8664 (MPIR 2.1.1) gives Segmentation Faults. This problem is not limited to Sage.
Corresponding mpir-devel thread
Upstream: Completely fixed; Fix reported upstream
Component: packages: standard
Author: Leif Leonhardy, Jeroen Demeyer
Reviewer: Leif Leonhardy, Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/9837
The text was updated successfully, but these errors were encountered: