Problem
If I make a call to realpath(S) from within my source I find that, when compiled, the resulting binary will terminate with the error:
Memory fault(coredump) Cause
The character buffer passed to realpath(S) is being passed to
a function called pathcanon(). This function is calling getcwd(S)
with a buffer size of 4096 bytes. getcwd(S) clears this buffer
and overruns the stack causing the core dump. Solution
This problem has been reported to SCO Engineering.
To work around this problem, make sure that the character buffer passed to realpath(S) is 4096 bytes in size:
char buff[4096];realpath(filename, buff);where 'filename' is the name of the file whose path you wish to resolve.