Loading ...
Sorry, an error occurred while loading the content.

Bug...?

Expand Messages
  • John Love-Jensen
    Hi everyone, Building Vim 6.4.x and 7.x on my Mac was producing crashes in ex_docmd.c expand_filename() routine, when repl was being freed incorrectly. Heap
    Message 1 of 2 , Dec 25, 2005
    • 0 Attachment
      Hi everyone,

      Building Vim 6.4.x and 7.x on my Mac was producing crashes in ex_docmd.c
      expand_filename() routine, when repl was being freed incorrectly. Heap
      corruption.

      Annoying.

      Compiling with...
      CFLAGS = -O0 -g
      ...the bug went away.

      Hmmmm.

      After quite a bit of experimentation, I finally hit upon this...
      CFLAGS = -O2 -g -fno-loop-optimize

      $ gcc --version
      powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
      5247)
      Copyright (C) 2005 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

      $ uname -a
      Darwin G5Quad.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04
      PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc

      Bug in the GCC compiler? Bug in Vim code? Hmmmmmm. Bug somewhere.

      Just thought I'd share. :-)

      Sincerely,
      --Eljay
    • Benji Fisher
      ... I get the same output for gcc --version and uname -a . Here is what I get when I check for vim s compile-time options (which went smoothly, without doing
      Message 2 of 2 , Dec 26, 2005
      • 0 Attachment
        On Sun, Dec 25, 2005 at 07:59:37AM -0600, John Love-Jensen wrote:
        > Hi everyone,
        >
        > Building Vim 6.4.x and 7.x on my Mac was producing crashes in ex_docmd.c
        > expand_filename() routine, when repl was being freed incorrectly. Heap
        > corruption.
        >
        > Annoying.
        >
        > Compiling with...
        > CFLAGS = -O0 -g
        > ...the bug went away.
        >
        > Hmmmm.
        >
        > After quite a bit of experimentation, I finally hit upon this...
        > CFLAGS = -O2 -g -fno-loop-optimize
        >
        > $ gcc --version
        > powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
        > 5247)
        > Copyright (C) 2005 Free Software Foundation, Inc.
        > This is free software; see the source for copying conditions. There is NO
        > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
        >
        > $ uname -a
        > Darwin G5Quad.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04
        > PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc
        >
        > Bug in the GCC compiler? Bug in Vim code? Hmmmmmm. Bug somewhere.
        >
        > Just thought I'd share. :-)
        >
        > Sincerely,
        > --Eljay

        I get the same output for gcc --version and uname -a . Here is
        what I get when I check for vim's compile-time options (which went
        smoothly, without doing anything special to set optimization options on
        my part):

        $ vim --version
        VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Oct 18 2005 08:20:59)
        MacOS X (unix) version
        [snip]
        Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MAC -arch ppc -fno-common -fpascal-strings -Wall -Wno-unknown-pragmas -mdynamic-no-pic -pipe -I. -Iproto -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp -O2 -fno-strength-reduce -Wall -g -pipe -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -I/System/Library/Frameworks/Tcl.framework/Headers -D_REENTRANT=1 -D_THREAD_SAFE=1long
        Linking: [snip]

        What CFLAGS does autoconf choose by default on your system? If it is
        different from mine, we should figure out why. Perhaps you have some CC
        or CFLAGS variables defined in your default environment?

        HTH --Benji Fisher
      Your message has been successfully submitted and would be delivered to recipients shortly.