New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #31030 (closed defect: worksforme)

Opened 21 months ago

Last modified 12 months ago

mpq_canonicalize hangs in GMP 5.02

Reported by: bruck@… Owned by: mcalhoun@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: Cc:
Port: gmp

Description (last modified by macsforever2000@…) (diff)

Running this short program:

#include <stdio.h>
#include <gmp.h>
int main()
{
  mpq_t qx;

  mpq_init (qx);
  mpq_set_str (qx, "537/238", 10);
  gmp_printf ("%Qd\n", qx);
  mpq_canonicalize(qx);
  gmp_printf ("%Qd\n", qx);
  return 0;
}

HANGS in my GMP 5.02 as installed by MacPorts (and also when I install it myself). It prints 537/238 once, and apparently hangs in the "canonicalize" routine. It definitely does NOT do this on my SuSE 11.4 box, but it does it both on my Mac laptop and on my Mac Pro (both running Lion and with Xcode installed). Both gcc and icc compile it, but it hangs on Mac boxes.

Can anybody reproduce this? Picking rational numbers at random, it seems to happen on about 5% of them.

--Ron Bruck

Change History

comment:1 follow-up: ↓ 2 Changed 21 months ago by macsforever2000@…

  • Cc bruck@… removed
  • Keywords GMP, mpq_canonicalize removed
  • Description modified (diff)
  • Owner changed from macports-tickets@… to mcalhoun@…
  • Port set to gmp

In the future, please use WikiFormatting, fill in the Port field and Cc the maintainer(s).

comment:2 in reply to: ↑ 1 Changed 21 months ago by bruck@…

Replying to macsforever2000@…:

In the future, please use WikiFormatting, fill in the Port field and Cc the maintainer(s).

Sorry, I did the best I could on a first post. There was no indication of the bizarre format until it was too late to withdraw it.

I 'fixed' the problem by manually uninstalling gmp, then reinstalling with MacPorts. The port had installed over a previous version of 5.0.2 which I had personally installed (and which had passed 'make check', shiver) and the overlay was bad medicine. (I didn't originally ASK to install 5.0.2, btw; MacPorts just did it.)

I went deaf in my left ear in the space of 15 minutes some years ago. I asked the doctor, Do you mean that I have no guarantee that some OTHER part won't someday just 'drop off'? So I've had things just suddenly quit working. But it still disturbs me, because this code had been stable for MONTHS.

comment:3 Changed 12 months ago by jmr@…

  • Status changed from new to closed
  • Resolution set to worksforme
Note: See TracTickets for help on using tickets.