Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

possible clang (2.9) bug affecting ssh-keygen

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


dtucker at zip

Jul 3, 2012, 6:34 AM

Post #1 of 1 (161 views)
Permalink
possible clang (2.9) bug affecting ssh-keygen

Hi all.

Has anyone had any success building openssh 6.0p1 using clang 2.9? I
think I found a compiler bug, at least in the 2.9 that ships with fedora
16 (i386). It causes (at least) ssh-keygen to spin indefinitely eating CPU.

I've reduced it to the following test case:

$ cat clang-test.c
#include <unistd.h>

char hostname[64];
int
main(int argc, char **argv)
{
gethostname(hostname, sizeof(hostname));
}

$ clang -O2 -D_FORTIFY_SOURCE clang-test.c
$ ./a.out
[hangs]

It works fine with gcc and clang 3.1 (built from source) on the same
machine and clang 3.0 on ubuntu x86_64. Removing either -O2 or
-D_FORTIFY_SOURCE, or moving hostname from a global to a local variable
causes it to work with 2.9.

Given that it seems to be fixed in the newer clang versions I don't
intend filing a bug unless there's some evidence it affects newer
versions too.

Thanks.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.