Subject: RE: Exception: STATUS_PRIVILEGED_INSTRUCTION occurs before main is executed.
From: "Bruce Adams [TEPG Sunbury]" <[email-masked]>
To: <[email-masked]>
Cc: "Steven O'Brien" <[email-masked]>
Date: Thu, 6 Mar 2003 09:41:14 -0000

>-----Original Message-----
>From: Steven O'Brien [mailto:[email-masked]]
>Sent: 05 March 2003 11:36
>To: [email-masked]
>Subject: Re: Exception: STATUS_PRIVILEGED_INSTRUCTION occurs 
>before main is executed.
>
>
>Bruce Adams wrote:
>> I have lately been having real problems with vanilla gcc 3.2
>> generating executables that crash.
><snip>
>> The simplest way to reproduce the problem is to have a main function
>> in a file with a .h of the same name as below.
>
>Bruce I have tried your example code and it works fine for me:
>Windows 2000 SP2, cygwin-1.3.20-1, gcc-3.2 20020927 (prerelease), 
>binutils-2.13.90 20021118.
>
>Maybe the problem is in your cygwin installation?
>
>Steven
>
Thanks for trying it.

Noramlly before I waste bandwidth here I do a clean install of the latest
cygwin packages.  I did one a short while ago and it didn't solve the
problem.
Also I tried this on two machines with independent installs.
However, I did one last night on the off chance that something might have
been
updated that fixes it.  Lo and behold my compiler works.  My apologies for
wasting bandwidth.  As a bonus this also fixes my problem with gcj being
unable to make standalone executables that work.
Its probably not worth wasting further bandwidth to go into a root cause 
analysis but I'm sure that the previous installation included a corrupt gcc.
I'm still curious what could have gone wrong with the installation, in case
it
happens again.  I notice that in the intervening time we have moved from

gcc version 3.2 20020818 (prerelease)

to

gcc version 3.2 20020927 (prerelease)

and the gcc package has moved from

binutils            20021107-1
gcc                 3.2-1
gcc-mingw           3.2-20020817-1

To

binutils             20021117-1
gcc                  3.2-3
gcc-mingw            20020817-5

I guess I missed the announce somewhere.
We're still using a "prerelease" whatever that means.

My feeling is that 3.2-1 must have been corrupt rather than my
installations.
I think it would be a great idea if the post setup phase did some
basic configure style checking (assuming it doesn't already).
i.e.
   Checking if the compiler gcc works.... No

It would have saved me a couple of months of heartache.
I seems very strange that nobody else spotted it though.
How exactly could an installation become so corrupt that nothing short of
a complete download (from a different mirror site) fixes it without the
underlying package being in error?

Regards,
	  Bruce A.

============================================================================
 Any opinions expressed in this e-mail are those of the individual and not
 necessarily those of Tyco Safety Products.

 Any prices for the supply of goods or services are only valid if supported
 by a formal written quotation.

 This e-mail and any files transmitted with it, including replies and
 forwarded copies (which may contain alterations) subsequently transmitted
 from Tyco Saftey Products are confidential and solely for the use
 of the intended recipient.

 If you are not the intended recipient or the person responsible for
 delivery to the intended recipient, be advised that you have received this
 e-mail in error and that any use is strictly prohibited.  In this event,
 please notify us via e-mail at [email-masked]' or telephone on 
 0121 255 6499 and then delete the e-mail and any copies of it.
============================================================================

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/