Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 3 Jun 2003 18:00:28 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: SEGV in conv_path_list_buf_size with xemacs-21.5-b13 and cygwin-1.3.22-1 Message-ID: <20030603220028.GA3704@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <16092 DOT 62778 DOT 903944 DOT 717787 AT gargle DOT gargle DOT HOWL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16092.62778.903944.717787@gargle.gargle.HOWL> User-Agent: Mutt/1.4.1i 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/