Message-ID: <00b201c069d3$2e7af580$0500a8c0@brk> From: "Johan Henriksson" To: Subject: Re: DJGPP Bug? Date: Tue, 19 Dec 2000 16:47:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com from: Johan Henriksson, leadprogrammer @ www.realsoftware.cjb.net "The individual should be praised for it's struggle, the society condemned for it's actions" - me 1997 #12035895 ---------------------------------------------------------------------------- ------------------- >Here is a bug that I think should be verified by you guys before I report it >(as it could be my fault). This is an exact source code listing: >struct Intptrholder >{ > int * intinstruct; >}; > >int main() >{ > int * intptr; > Intptrholder * intptrholder; > intptrholder->intinstruct = intptr; > return 0; >} Isn't it quite obvius? You're dereferencing the pointer intptrholder with is invalid and then writes the adress of intptr to intinstruct, causing the GPF. Valid version: struct Intptrholder { int * intinstruct; }; int main() { int * intptr; Intptrholder intptrholder; intptrholder.intinstruct = intptr; return(0); }