* Failed assertion in path.cc (path_conv::check)
@ 2013-06-21 7:43 Charles Wilson
2013-06-21 8:30 ` Corinna Vinschen
0 siblings, 1 reply; 3+ messages in thread
From: Charles Wilson @ 2013-06-21 7:43 UTC (permalink / raw)
To: cygwin
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?
Failed assertion
src
at line 675 of file
/home/corinna/src/cygwin/cygwin-1.7.21/64/cygwin-1.7.21-5/src
/src/winsup/cygwin/path.cc
in function void path_conv::check(const char*, unsigned int, const
suffix_info*)
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Failed assertion in path.cc (path_conv::check)
2013-06-21 7:43 Failed assertion in path.cc (path_conv::check) Charles Wilson
@ 2013-06-21 8:30 ` Corinna Vinschen
2013-06-30 23:06 ` Charles Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2013-06-21 8:30 UTC (permalink / raw)
To: cygwin
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.
HTH,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Failed assertion in path.cc (path_conv::check)
2013-06-21 8:30 ` Corinna Vinschen
@ 2013-06-30 23:06 ` Charles Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Charles Wilson @ 2013-06-30 23:06 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-30 21:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 7:43 Failed assertion in path.cc (path_conv::check) Charles Wilson
2013-06-21 8:30 ` Corinna Vinschen
2013-06-30 23:06 ` Charles Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).