Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132893 - gcc/glibc sincosf() segmentation fault...
Summary: gcc/glibc sincosf() segmentation fault...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-10 06:16 UTC by Yo. E
Modified: 2006-05-10 23:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yo. E 2006-05-10 06:16:28 UTC
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.
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2006-05-10 06:59:10 UTC
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.
Comment 2 Yo. E 2006-05-10 23:39:09 UTC
(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.