This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: SEGV in conv_path_list_buf_size with xemacs-21.5-b13 and cygwin-1.3.22-1
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 3 Jun 2003 18:00:28 -0400
- Subject: Re: SEGV in conv_path_list_buf_size with xemacs-21.5-b13 and cygwin-1.3.22-1
- References: <16092.62778.903944.717787@gargle.gargle.HOWL>
- Reply-to: cygwin at cygwin dot com
On Tue, Jun 03, 2003 at 02:21:30PM -0500, Pete McCann wrote:
>I don't understand why "path" is filled with junk. Also, note that
>normalized_path is NULL, which I think is the culprit with respect to
>strlen. Perhaps it is this code:
>
>
> /* 100: slop */en = (to_posix
> size = strlen (path_list)unt_table->mount[i].posix_pathlen
> + (num_elms * max_mount_path_len)>mount[i].native_pathlen);
> + (nrel * strlen (to_posix ? pc.get_win32 () : pc.normalized_path))
> + 100;
> return size;
>
>which is causing the problem. If I understand correctly, this
>should be accessing pc.normalized_path (to_posix = false).
Very nice analysis. Much appreciated.
I don't have much time to look into this right now, but it sure seems like
a test in conv_path_list_buf_size is reversed. If so, it's incredible that
this ever worked. Does the following fix the problem?
cgf
Index: path.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
retrieving revision 1.254
diff -u -p -r1.254 path.cc
--- path.cc 30 May 2003 23:43:24 -0000 1.254
+++ path.cc 3 Jun 2003 21:59:02 -0000
@@ -3551,7 +3551,7 @@ conv_path_list_buf_size (const char *pat
/* 100: slop */
size = strlen (path_list)
+ (num_elms * max_mount_path_len)
- + (nrel * strlen (to_posix ? pc.get_win32 () : pc.normalized_path))
+ + (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ()))
+ 100;
return size;
}
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/