From: pavenis AT lanet DOT lv Message-ID: To: eplmst AT lu DOT erisoft DOT se (Martin Stromberg), djgpp AT delorie DOT com Date: Mon, 27 Sep 1999 16:23:46 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Generating SIGSEGV In-reply-to: <7snfkf$2p1$1@antares.lu.erisoft.se> X-mailer: Pegasus Mail for Win32 (v3.12a) Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 27 Sep 99, at 10:07, Martin Stromberg wrote: > The solution is to _use_ the value of i, otherwise it's optimised out > of the loop. > > Martin Str|mberg (ams AT ludd DOT luth DOT se) wrote: > : Hmm. It's strange, when I really want to make my program crash with > : SIGSEGV it seems impossible to achive that. > When I checked modified version of dbgcom.c in begin of this Year I used something like #include char * Bad (void); int main (void) { cout << strlen(Bad()); return 0; } char * Bad (void) { return (char *) 0x12345678U; } (it was not so difficult) Andris