On 6/21/2013 4:21 AM, Corinna Vinschen wrote:
On Jun 21 03:26, Charles Wilson wrote:
The following statement:
char * tmp_path =
(char *) cygwin_create_path (CCP_POSIX_TO_WIN_A, newargz[0]);
Results in this error popup (and a coredump), when newargz[0] is
NULL. Sure, it's a bug in my program to do that...but shouldn't it
be handled more gracefully? Like...return a NULL, rather than
SIGABRT?
I changed the underlying cygwin_conv_path to handle NULL gracefully
by returning -1 and setting errno to EINVAL. This results in a NULL
return from cygwin_create_path.
Using the old (buggy) version of my program, this change to the
cygwin1.dll DTRT and I don't see the coredump anymore. Thanks.
'Course, I've fixed my program to not do that, but this was still a
cygwin bug IMO so thanks for fixing it.
--
Chuck
--
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