| Summary: | gcc/glibc sincosf() segmentation fault... | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Yo. E <yorzan> |
| Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Other | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
Kindly read the manpage and/or turn up your warning level. That it happens to work with gcc's own sincosf() is pure luck, you're missing #define _GNU_SOURCE. (In reply to comment #1) > Kindly read the manpage and/or turn up your warning level. That it happens to > work with gcc's own sincosf() is pure luck, you're missing #define _GNU_SOURCE. > Oh.. Thank you. This feature was not mentioned in mans that i have read. |
This simple code #include <math.h> int main () { float A[2]; float pH = 0.1; sincosf(pH, &A[0], &A[1]); return 0; } cause segmentation fault on several linux distro & glibc versions, at lest: SuSE Linux, gcc-3.3.3 & glibc-2.3.3, with -fno-builtind; Gentoo Linux, gcc-3.4.4 & glibc-2.3.4, with -O3 -fno-builtind options; The bug resides on the glibc library since there is no segfault without -fno-builtind option on some distro.