g77 ordering of "COMMON A, IPAD" could cause crash on i386 platforms
aspiesrule@mcleodusa.net
aspiesrule@mcleodusa.net
Tue Nov 4 12:48:00 GMT 2003
Zack Weinberg <zack@codesourcery.com> said:
> <aspiesrule@mcleodusa.net> writes:
>
> > If "COMMON A, IPAD" was compiled by g77 without proper padding
> > for a 486 or higher IA-32 CPU, the AC flag in EFLAGS and the AM bit
> > in CR0 were both set, the program was running at PL3, and the vector
> > (interrupt gate descriptor) for the #AC exception was not
> > initalized, trashed, or points to an object that cannot be executed
> > or is garbage, the computer could do some strange things. Point: It
> > is best to add proper padding, not only to reap its performance
> > benefits, but to prevent unnecessary exceptions (or the potential
> > for undefined behavior) on the i386, for example.
>
> g77 is not responsible for the operating system having failed to
> initialize the interrupt table properly.
>
> Have you actually observed g77 fail to give an object proper
> alignment, or are you speculating? If the former, please submit a
> proper bug report with complete test case.
>
> zw
>
--
> g77 is not responsible for the operating system having failed to
> initialize the interrupt table properly.
Well, that's true. But, if the OS screws this up, what is g77 supposed
to do? I think a sanity check would be a good idea here.
Lucas
More information about the Gcc
mailing list