Home My Page Projects MPFR
Summary Activity Forums Tracker Lists Tasks Docs News SCM Files

[#13933] sometimes freezes with full logging

Date:
2012-02-23 17:04
Priority:
3
State:
Closed
Submitted by:
Vincent Lefèvre (vlefevre)
Assigned to:
Nobody (None)
Category:
general
Resolution:
Fixed
Target Version:
None
 
Summary:
sometimes freezes with full logging

Detailed description
MPFR (3.1.0 and the trunk r8041) sometimes freezes with full logging. To reproduce:

$ ./configure --enable-logging
$ make
$ cd tests
$ make tadd
$ MPFR_LOG_ALL=1 ./tadd

With the same command (run several times), two behaviors are visible:
1. Everything is fine; the mpfr.log file gets large immediately.
2. The tadd process freezes, taking lots of memory, and mpfr.log remains empty.

The bug always seems to occur under valgrind and never seems to occur under gdb.

Tested with GCC 4.6.2 on x86_64.

Followup

Message
Date: 2012-02-24 12:01
Sender: Vincent Lefèvre

The bug was a typo in MPFR_LOG_FUNC of add_d.c, add_ui.c and mul_d.c (mpfr_get_prec instead of mpfr_log_prec). Fixed in r8043.
Date: 2012-02-24 11:37
Sender: Vincent Lefèvre

I can reproduce the bug by replacing tadd.c by:

#include "mpfr-test.h"

int main (void)
{
mpfr_t x;

mpfr_init2 (x, 4);
mpfr_set_ui (x, 1, MPFR_RNDN);
mpfr_add_ui (x, x, 1, MPFR_RNDN);
mpfr_clear (x);

return 0;
}

with gcc 4.4.6, 4.5.3 and 4.6.2 under Debian and CFLAGS=-O0 to disable optimizations. The bug occurs only with dynamic linking, though when libmpfr.a is used, the program is sometimes slower because it uses a lot of memory (but it doesn't freeze like with dynamic linking).

Attached Files:

Changes:

Field Old Value Date By
ResolutionNone2012-02-24 12:01vlefevre
close_date2012-02-24 12:012012-02-24 12:01vlefevre
status_idOpen2012-02-24 12:01vlefevre
CategoryNone2012-02-23 17:04vlefevre