This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bug report. Clang sqrtl(-1) causes access violation
On 10/05/2019 15.50, Jose Isaias Cabrera wrote:
It works for me.
Now it turns out that all the long double math functions cause access
violations.
If you can't reproduce the error, what can I do to trace it?
Exception: STATUS_ACCESS_VIOLATION at rip=00180173164
Sam Habiel wrote:
Wow I can't believe that The Agner Fog posted on the Cygwin mailing list!
This is the place to post bug reports, right?
On 10/05/2019 15.50, Jose Isaias Cabrera wrote:
Agner Fog, on Friday, May 10, 2019 08:57 AM, wrote...
>
>Bug description:
>
>The sqrtl function under Clang causes an access violation when the
>argument is negative.
>
>This error occurs only under Cygwin.
>
>This error occurs only with the sqrtl function, not with sqrt or sqrtf
>
It works for me.
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ clang sqrt.cpp
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ ls
a.exe a.exe.stackdump ATT00001.txt cygcheck.out sqrt.cpp
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ ./a.exe
-1.000000
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ uname -a
CYGWIN_NT-6.1 HOR711318E 3.0.7(0.338/5/3) 2019-04-30 18:04 i686 Cygwin
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ clang --version
clang version 5.0.1 (tags/RELEASE_501/final)
Target: i686-pc-windows-cygnus
Thread model: posix
InstalledDir: /usr/bin
e608313@HOR711318E /cygdrive/c/source/c++/cygwin
$ cat sqrt.cpp
#include <stdio.h>
#include <math.h>
float a = -1.f;
int main() {
float b = sqrtl(a);
printf("%f\n", b);
return 0;
}
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple