Folks, the function VfrCompiler::VfrCompiler() has a bug related to 
uninitialized variables. This shows up (in my experience) mostly under Linux 
systems.

Below is the constructor for the compiler class. Please note that the 
IS_RUN_STATUS member function is called before SET_RUN_STATUS member function.

mRunStatus is a member variable of the CVfrCompiler class but is not 
initialized before this point.

This typically shows up as the following error message (much later)

"VfrCompile" -l -n --output-directory dir FrontPageVfr.ii
VfrCompile: ERROR 0003: Error parsing
  compile error in file (null)

Since you may not want to set mRunStatus to STATUS_INITIALIZED so early in the 
constructor, it would require another status value to be created and used prior 
to calling OptionInitialization()

Thanks,

Tim


CVfrCompiler::CVfrCompiler (
  IN INT32      Argc,
  IN CHAR8      **Argv
  )
{
  mPreProcessCmd = (CHAR8 *) PREPROCESSOR_COMMAND;
  mPreProcessOpt = (CHAR8 *) PREPROCESSOR_OPTIONS;

  OptionInitialization(Argc, Argv);

  if ((IS_RUN_STATUS(STATUS_FAILED)) || (IS_RUN_STATUS(STATUS_DEAD))) {
    return;
  }

  SET_RUN_STATUS(STATUS_INITIALIZED);
}
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to