Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Fwd: WIN32: Loading iof conv causes stack overflow
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jiri Sedlak  
View profile  
 More options Sep 12 2012, 5:03 pm
From: Jiri Sedlak <jiri_sed...@users.sourceforge.net>
Date: Wed, 12 Sep 2012 22:39:53 +0200
Local: Wed, Sep 12 2012 4:39 pm
Subject: Fwd: WIN32: Loading iof conv causes stack overflow

Hello,

I discovered stack overflow in WIN32 builds of VIm. Repeatability is 100%

Here is scenario:

1) start vim
2) set enc option to for example iso-8859-2.
3) vim crash

Attached os_win32.c.diff patch contains patch that fixes previously
mentioned stack overflow .This is caused by loading of iconv library.
Loading mechanism calls functions that utilises encoding conversion,
and these functions load iconv library again, because it is not loaded
yet.

Attached Make_mvc.mak.diff contains patch file that adds version of
nmake that is distributed with Visual studio 6 service pack 6.

Regards

Jiri Sedlak

  os_win32.c.diff
1K Download

  Make_mvc.mak.diff
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "WIN32: Loading iof conv causes stack overflow" by Ben Fritz
Ben Fritz  
View profile  
 More options Sep 12 2012, 5:53 pm
From: Ben Fritz <fritzophre...@gmail.com>
Date: Wed, 12 Sep 2012 14:53:46 -0700 (PDT)
Local: Wed, Sep 12 2012 5:53 pm
Subject: Re: WIN32: Loading iof conv causes stack overflow

Reproduced in 7.3.646, which I was doubtful of, because my .vimrc contains "set encoding=utf-8" and I've never seen a crash because of it. In the past I've also set the encoding to cp1252 and others without problems.

But setting it to iso-8859-2 causes Vim to terminate with no warning or dialog popping up on the very next keystroke (which in my case happened to be ':', because I was attempting to type ":set enc?").

I haven't tried the patch.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jiri Sedlak  
View profile  
 More options Sep 13 2012, 2:05 am
From: Jiri Sedlak <jiri_sed...@users.sourceforge.net>
Date: Thu, 13 Sep 2012 08:05:14 +0200
Local: Thurs, Sep 13 2012 2:05 am
Subject: Re: WIN32: Loading iof conv causes stack overflow
Hello,

Codepages are not re-coded by iconv but by MultiByteToWideChar
function. So if you set cp... the iconv library is not loaded.
SO was introduced in VIm7.3.034 so it is realy long time ago. But I
needed open file in iso-8859-2 coding on Monday, so I came across it.

Regards

JiriS

On 12 September 2012 23:53, Ben Fritz <fritzophre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ZyX  
View profile   Translate to Translated (View Original)
 More options Sep 13 2012, 10:51 am
From: ZyX <zyx....@gmail.com>
Date: Thu, 13 Sep 2012 07:51:24 -0700 (PDT)
Local: Thurs, Sep 13 2012 10:51 am
Subject: Re: WIN32: Loading iof conv causes stack overflow

четверг, 13 сентября 2012 г., 10:05:16 UTC+4 пользователь Jiri Sedlak написал:

> Hello,

> Codepages are not re-coded by iconv but by MultiByteToWideChar
> function. So if you set cp... the iconv library is not loaded.
> SO was introduced in VIm7.3.034 so it is realy long time ago. But I
> needed open file in iso-8859-2 coding on Monday, so I came across it.

You must not be using this option for opening files with particular encoding, you corrupt any existing non-ASCII string already loaded in memory that way. There are enough pointers to a correct way of opening a file in “:h 'encoding'”.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Fritz  
View profile   Translate to Translated (View Original)
 More options Sep 13 2012, 10:54 am
From: Ben Fritz <fritzophre...@gmail.com>
Date: Thu, 13 Sep 2012 07:54:02 -0700 (PDT)
Local: Thurs, Sep 13 2012 10:54 am
Subject: Re: WIN32: Loading iof conv causes stack overflow

Regardless, Vim should not crash. When I reproduced it, the "set encoding" command was the first thing done in a configuration-less Vim.

As for opening files "the right way", also see http://vim.wikia.com/wiki/Working_with_Unicode


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Fritz  
View profile   Translate to Translated (View Original)
 More options Sep 13 2012, 10:55 am
From: Ben Fritz <fritzophre...@gmail.com>
Date: Thu, 13 Sep 2012 07:55:45 -0700 (PDT)
Local: Thurs, Sep 13 2012 10:55 am
Subject: Re: WIN32: Loading iof conv causes stack overflow

And also http://vim.wikia.com/wiki/Reloading_a_file_using_a_different_encoding and other links from that page.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yukihiro Nakadaira  
View profile  
 More options Sep 15 2012, 7:12 pm
From: Yukihiro Nakadaira <yukihiro.nakada...@gmail.com>
Date: Sun, 16 Sep 2012 08:12:29 +0900
Local: Sat, Sep 15 2012 7:12 pm
Subject: Re: WIN32: Loading iof conv causes stack overflow
This patch doesn't work for unicode path.

> gvim -u NONE

:set enc=utf-8
:call mkdir("\u1234")             " Create directory with unicode character
:cd <U+1234>                      " which is not contained current codepage.
:pwd
C:\Users\yukihiro\tmp\<U+1234>
:call libcall('a.dll', 'b', 'c')  " No need existing dll for this test.
E364: Library call failed for "b()"
:pwd
C:\Users\yukihiro\tmp\vim\src     " Directory is changed.

--
Yukihiro Nakadaira - yukihiro.nakada...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Takata  
View profile  
 More options Sep 15 2012, 9:50 pm
From: Ken Takata <ken...@csc.jp>
Date: Sat, 15 Sep 2012 18:50:33 -0700 (PDT)
Local: Sat, Sep 15 2012 9:50 pm
Subject: Re: WIN32: Loading iof conv causes stack overflow

Hi,

2012/09/16 Sun 8:12:34 UTC+9 Yukihiro Nakadaira:

> This patch doesn't work for unicode path.

I wrote a patch for that.

Additionally I found a mistake in a comment of os_win32.h.
_MAX_PATH is defined as 260 (not 256) on Windows.

Regards,
Ken Takata

  os_win32.c.patch
1K Download

  os_win32.h.patch
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yukihiro Nakadaira  
View profile  
 More options Sep 16 2012, 4:31 am
From: Yukihiro Nakadaira <yukihiro.nakada...@gmail.com>
Date: Sun, 16 Sep 2012 17:30:57 +0900
Local: Sun, Sep 16 2012 4:30 am
Subject: Re: WIN32: Loading iof conv causes stack overflow

On Sun, Sep 16, 2012 at 10:50 AM, Ken Takata <ken...@csc.jp> wrote:
> 2012/09/16 Sun 8:12:34 UTC+9 Yukihiro Nakadaira:
>> This patch doesn't work for unicode path.

> I wrote a patch for that.

It works.  Thank you.

--
Yukihiro Nakadaira - yukihiro.nakada...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »