delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/27/09:39:35

From: pavenis AT lanet DOT lv
Message-ID: <B0000103241@stargate.astr.lu.lv>
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
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

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 <iostream>

char * Bad (void);

int main (void)
  {
     cout << strlen(Bad());
     return 0;
  }

char * Bad (void) { return (char *) 0x12345678U; }

(it was not so difficult)

Andris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019