Tony Mechelynck wrote:

> On 09/04/08 11:30, Bram Moolenaar wrote:
> [...]
> > Now the patch is attached, hopefully that works better.
> 
> Patch went OK this time -- except for the helpfile, but that was 
> expected: patches for runtime files are always flaky, and it won't 
> change anything to the binary.
> 
> Added a --with-modified-by="Bram Moolenaar (floating point)" argument 
> (via $CONF_ARGS) and started "make reconfig" on a Huge build.
> 
> It compiles and ":version says +float -- I'll post the full ":version" 
> output at http://users.skynet.be/antoine.mechelynck/vim/version.txt 
> (reformatted to 80 characters for readability).
> 
> Let's do a few tests...
> 
> Oh, oh.. it had started working (and &1.0e256 multiplied by itself gives 
> inf, which is correct), but ":echo &1.0e308" crashes gvim (on Linux 
> i686) with SIGSEGV.

Easy to reproduce.  Turns out that this line causes it:

        sprintf(tmp, format, f);

Here "format" is "%f"  and "f" is your value 1e+308.  The result is an
awful long string of numbers.  I suppose it's about 308 digits.  How big
does "tmp" need to be to hold any result here?  I don't think %f has a
way of specifying a maximal field width.

> And BTW -- I found one oversight in the helpfile patch:
> 
> runtime/doc/eval.txt, line 40 is unchanged, there is:
>    There are five types of variables:
> There should be:
>    There are six types of variables:

Thanks.

-- 
hundred-and-one symptoms of being an internet addict:
269. You receive an e-mail from the wife of a deceased president, offering
     to send you twenty million dollar, and you are not even surprised.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui