Seems the problem is localized to WebKit

Anybody else notice this?

All code snippets, not just a particular post;

http://stackoverflow.com/questions/2350874/ysod-yellow-screen-of-death-javascript-regexp-syntax-error

http://stackoverflow.com/questions/2481664/pass-array-to-client-side-for-display/2483402#2483402

are just a couple..


Question: printf is causing a segfault with getlogin()
Answer: You should check getcwd return value. According to man page of getcwd:


  If the length of the absolute pathname of the current working
  directory, including the terminating null byte, exceeds size bytes,
  NULL is returned, and errno is set to ERANGE; an application should
  check for this error, and allocate a larger buffer if necessary.