bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory access violation in mpz_printf using gmp 4.1.4 on Athlon64 fedora


From: Juergen Bullinger
Subject: Memory access violation in mpz_printf using gmp 4.1.4 on Athlon64 fedora core 4
Date: Fri, 11 Nov 2005 20:25:09 +0100

Hello,

I want to report a bug in gmp.

I got a program crash while trying to print a large integer number
(2^25964951).
Please note, that I could calculate this number. It is less then 10
million digits large and known as mersenne prime nr. 42 + 1.


Here are the detauls:
=-=-=-=-=-=-=-=-=-=-=-
GMP-Version: I could reproduce the error with 4.1.3 as well as 4.1.4. I
compiled both myself.

Test Program: included see below

error desription: The program crashes during a call to mpz_printf with a
"Speicherzugriffsfehler" (literally translated "Memory access
violation").
Originally I had this problem on a program which calculates big prime
numbers, then I programmed a simple test program which calculates M42
and tries to print it out afterwards. The program calls mpz_ui_pow_ui
without any obvious problem. When I try to print this number, I get the
descirbed crash. The problem seems not to be related to how the number
is created, it just appears when trying to print a number of a certain
size or bigger.

configuration options used when building GMP: -prefix=/usr

compiler version:
Es werden eingebaute Spezifikationen verwendet.
Ziel: x86_64-redhat-linux
Konfiguriert mit: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--host=x86_64-redhat-linux
Thread-Modell: posix
gcc-Version 4.0.1 20050727 (Red Hat 4.0.1-5)

output of uname -a:
Linux localhost.localdomain 2.6.13-1.1532_FC4 #1 Thu Oct 20 01:28:35 EDT
2005 x86_64 x86_64 x86_64 GNU/Linux

output of config.guess (gmp version 4.1.4):
x86_64-unknown-linux-gnu

output of configfsf.guess (gmp version 4.1.4):
x86_64-unknown-linux-gnu

Details on the test program:
Please find the attached c source of the program. I compiled it using

        g++ -o gmzPrintfTest gmzPrintfTest.c -lgmp -m64

It works this way:
1. Calculate Mersenne prime Nr. 42 + 1 which is 2^25964951.
2. try to print this number using gmp_printf

Is this a known problem? are there already workarounds?

Thank you in advance


-- 
Juergen Bullinger <address@hidden>
-- 
Juergen Bullinger <address@hidden>

Attachment: gmzPrintfTest.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]