delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/01/26/19:00:40

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "'Raf256' Rafal Maj" <raf256 AT szybkapoczta DOT pl>
Newsgroups: comp.os.msdos.djgpp
Subject: SigSegV in new[]
Date: 26 Jan 2002 23:53:32 GMT
Organization: aa
Lines: 33
Sender: raf256 AT poczta DOT onet DOT pl@chello062179025129.chello.pl
Message-ID: <Xns91A39E5911F3rfdfciasdsdj412tr@213.180.128.20>
NNTP-Posting-Host: chello062179025129.chello.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1012089212 29764 62.179.25.129 (26 Jan 2002 23:53:32 GMT)
X-Complaints-To: abuse AT onet DOT pl
NNTP-Posting-Date: 26 Jan 2002 23:53:32 GMT
User-Agent: Xnews/4.11.09
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I know that deleteing or free-ing invalid pointer may crash program 
(SigSegV), but allocating memory ?
My program crashes exacly in instruction :

char * p = new char[l];

where l is an integer = 5

why ? this is not out-of-momoy problem... Does it means that I had done 
something wrong with memory before and this effect appears later ?


Exiting due to signal SIGSEGV
General Protection Fault at eip=00055790
eax=0000000a ebx=746f6f72 ecx=000baf58 edx=00000002 esi=00000054 
edi=000c22e4
ebp=00141318 esp=00141308 program=C:\UPT\SRC\UPT.EXE
cs: sel=0497  base=84477000  limit=0014ffff
ds: sel=049f  base=84477000  limit=0014ffff
es: sel=049f  base=84477000  limit=0014ffff
fs: sel=0477  base=00013350  limit=0000ffff
gs: sel=04af  base=00000000  limit=0010ffff
ss: sel=049f  base=84477000  limit=0014ffff
App stack: [001422e4..000c22e4]  Exceptn stack: [000c223c..000c02fc]


-- 
Raf256
,--, _  ,-   _  _  _
|,-'`_|_|_  `_||_'|_' raf256 AT wp DOT pl GG-1175498 ICQ-143712878
| `\|_| |   |_,,_||_| 
C++; (_2b||!_2b)?this->is->a:question; {B.Stroustrup, W.Shakespeare}

- Raw text -


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