Bug 252
| Summary: | Run time error | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | xshen |
| Component: | libc | Assignee: | David Lawrence <dkl> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 5.1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 1998-12-03 17:03:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
I tested this in a Pc with redhat 5.0, and no error. In /usr/include/__math.h:552, if I change this line into long long int __p = (long int) __y, then I won't get error. Is this the problem? The original line is long long int __p = (long long int) __y Could not replicate this problem on a test machine. Used gcc-2.7.2.3-14 rpm. Did you try to change "double a[2];" to "int a[2];"? Only one of them will generate error by using gcc-2.7.2.3 with "-O2" option. Thanks! |
I use gcc and g++ to compile the following small code #include <math.h> main() { double a[2]; pow(2.0,3.0); } If I use -O2 option, and when I run the program I get "segmentation fault(core dumped)". If I do not use "-O2" option, I won't get any error. I also upgrade gcc-2.7.2.3 to gcc-2.8.1 and I still get same type error, but only when I change "double a[2]" into "int a[2]". Why does this happen? BTW, I upgraded the libc and glib package ftped from your web site.