Re: INTERNAL COMPILER ERROR: compiler file 'msc1.cpp', line 1794

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Alessio Calcagno (AlessioCalcagno_at_discussions.microsoft.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 03:31:02 -0700

Yes, you are probably right.

I am surprised this problem has not been widely reported and resolved before
- I did some research on the web and I found a few references to the problem
but no solutions or workarounds.

"Alexander Grigoriev" wrote:

> I think the problem is because the compiler doesn't seem to try to
> canonicalize the path, but seems to just append the #include specification
> to the current file path. It may cause buffer overflow in the compiler.
>
>
...
> > Anyway I think I figured out a satisfactory workaround that has minimal
> > impact.
> >
> > The workaround is to additionally include the header where VC++ fails
> > directly in the .cpp file that fails compiling - the additional include
> > directive must precede the include directive that starts the problematic
> > compound include path.
> >
> > Example:
> >
> > VC++ compilation error:
> > Compiling...
> > ...
> > A.cpp
> > C:/source/ALib/.../ZLib/Z.h(30) : fatal error C1001: INTERNAL
> COMPILER
> > ERROR (compiler file 'msc1.cpp', line 1794) ...
> >
> > Context:
> > let '#include "../AuxLib/Aux.h"' be the include directive inside
> A.cpp
> > that ultimately includes '/ZLib/Z.h' that causes the compiler to give
> up
> >
> > Workaround:
> > add to A.cpp an include directive for '.../ZLib/Z.h' before the
> > directive '#include "../AuxLib/Aux.h"'
> >
> > The idea is that when the preprocessor sees the include directive for
> > '.../ZLib/Z.h' inside the compounded path, it doesn't attempt to resolve
> it
> > because it has already resolved it. The preprocessor "knows" it has
> already
> > resolved that include thanks to the include guard ("#if !defined..." or
> > "#pragma once") that "should" be present in all header files.
> >



Relevant Pages

  • Re: Nasm 0.99.00
    ... "snprintf" to get rid of a buffer overflow). ... constantly having to convert snprintf() code for DJGPP. ... char arr; ... so, yeah, if I ever do get my compiler functional, likely at least some ...
    (alt.lang.asm)
  • Re: How to develop a random number generation device
    ... buffer overflow ...] ... The linker is not the same program in any environment I have ever heard of - but it is generally *called* by the compiler automatically, so it just looks like it is part of the compiler. ... The point is, any linking issues are handled by linking directives and not by anything you give to the compiler. ... The link-loader is a different animal altogether - it is what the operating system uses to actually load and run a program. ...
    (sci.electronics.design)
  • Re: bare bones file encrypter/decrypter using 128 bit Serpent algorithm
    ... if not producing any warnings is sufficient to prove a program is bug free then here is my implementation in standard C of the "Do whatever you want" program. ... misuse strncpy, you don't seed rand(). ... Such as a buffer overflow even if the user followed the instructions. ... and in fact they cannot because the compiler does not know what you intend only what you tell it. ...
    (comp.lang.c)
  • Re: Wu-ftpd FTP server contains remotely exploitable off-by-one bug
    ... a different compiler and OS ... buffer overflow does not exist on a different system. ... That being said, I havent ... To unsubscribe, ...
    (FreeBSD-Security)