Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 311661 Details for
Bug 455167
Segmentation violation when using large precisions.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test program that causes the crashes depending on the precision value selected by uncommenting the particularly desired value.
mpfr_test.cc (text/x-c++src), 1.50 KB, created by
c.h.
on 2008-07-13 11:24:17 UTC
(
hide
)
Description:
Test program that causes the crashes depending on the precision value selected by uncommenting the particularly desired value.
Filename:
MIME Type:
Creator:
c.h.
Created:
2008-07-13 11:24:17 UTC
Size:
1.50 KB
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <stdlib.h> > >#include <gmp.h> >#include <mpfr.h> > >//#define PRECISION_DESIRED 68*1024*1024 >//#define PRECISION_DESIRED 48*1024*1024 >//#define PRECISION_DESIRED 36*1024*1024 >//#define PRECISION_DESIRED 33*1024*1024 >#define PRECISION_DESIRED 20*1024*1024 >//#define PRECISION_DESIRED 1*1024*1024 >//#define PRECISION_DESIRED 1024 > >#define MP_ROUNDING GMP_RNDN > >int main (void) >{ > int retcode; > FILE *f_sqrt3; > mpfr_t mp_three, mp_sqrt3; > size_t output_count; > > if( PRECISION_DESIRED >= MPFR_PREC_MAX ) { > fprintf(stderr, "Desired precision too large; limit = %d\n", MPFR_PREC_MAX ); > exit(-1); > } > > f_sqrt3 = fopen("mpfr_sqrt3.txt", "w"); > > if( f_sqrt3 == NULL ) { > fprintf( stderr, "Can't open f_sqrt3!\n"); > exit(-1); > } > > fprintf(stderr,"Initializing...\n"); > > mpfr_set_default_prec (PRECISION_DESIRED ); > > fprintf(stderr,"Initializing...\n"); > > mpfr_init2 (mp_three, PRECISION_DESIRED); > mpfr_init2 (mp_sqrt3, PRECISION_DESIRED); > > fprintf(stderr,"Initializing...\n"); > fflush(stderr); > > // mp_three = 3 > retcode = mpfr_set_ui(mp_three, 3L, MP_ROUNDING ); > > // mp_sqrt3 = sqrt(3) > fprintf(stderr,"Calculating mp_sqrt3...\n"); > fflush(stderr); > retcode = mpfr_sqrt_ui(mp_sqrt3, 3L, MP_ROUNDING ); > retcode = mpfr_sqrt(mp_sqrt3, mp_three, MP_ROUNDING ); > > fprintf(stderr,"Writing mp_sqrt3...\n"); > fflush(stderr); > output_count = mpfr_out_str (f_sqrt3, 10, 0, mp_sqrt3, MP_ROUNDING); > fflush(f_sqrt3); > fclose(f_sqrt3); > > return 0; > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 455167
:
311660
| 311661