473,508 Members | 2,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Crash Dump

Hi,

My program crashes when it reaches a certain line. There is nothing
wrong with that particular line as I have changed it to something
simple like i=0, and it still crashes.

If I remove some paras of code from lines previous to this line, the
program run fine and does not crash. So I think that this has to do
with some kind of overflow. It seems to me that if the number of lines
of code accessed by my program goes above a limit, it crashes. So I
tried reducing the size of my program by removing the debug info during
compilation, but the program still crashes.

So I need help with understanding the crash dump. This is given below:

Exiting due to SIGSEGV
General protection fault at eip = 00002380

eax=01da2724 ebx=001190e4 ecx=001190e4
edx=00078500 esi=0011ed54 edi=00119060
ebp=00118fe8 esp=00118f60 program=a:\test.exe

cs: sel=00a7 base=10000000 limit=0012ffff
ds: sel=00af base=10000000 limit=0012ffff
es: sel=00af base=10000000 limit=0012ffff
fs: sel=00bf base=00000000 limit=0010ffff
gs: sel=00bf base=00000000 limit=0010ffff
ss: sel=00af base=10000000 limit=0012ffff

App stack: [0011912c..0009912c]
Exception stack: [00099080..00097140]

Call frame traceback EIPs:
0x00002380
0x000024a7
0x000094d3
0x0000267d
0x0003aa08

Btw, the program is written in C using the DJGPP compiler (GCC for DOS)
and compiled on a xp computer. Then I transfer the program on a floppy
to my DOS box, and run it - where it crashes. Can it have anything to
do with this XP->DOS transfer with subtly differing exe formats.

Any help is appreciated!!

Thanks,
Ahmad

Nov 14 '05 #1
4 2827
It looks like 'some paras of code' is the source of error. Check it
carefully for array index running out of range, wrong pointer arithmetic
and so on.
arizvi wrote:
Hi,

My program crashes when it reaches a certain line. There is nothing
wrong with that particular line as I have changed it to something
simple like i=0, and it still crashes.

If I remove some paras of code from lines previous to this line, the
program run fine and does not crash. So I think that this has to do
with some kind of overflow. It seems to me that if the number of lines
of code accessed by my program goes above a limit, it crashes. So I
tried reducing the size of my program by removing the debug info during
compilation, but the program still crashes.

Nov 14 '05 #2
arizvi wrote:

My program crashes when it reaches a certain line. There is nothing
wrong with that particular line as I have changed it to something
simple like i=0, and it still crashes.

If I remove some paras of code from lines previous to this line,
the program run fine and does not crash. So I think that this has
to do with some kind of overflow. It seems to me that if the number
of lines of code accessed by my program goes above a limit, it
crashes. So I tried reducing the size of my program by removing the
debug info during compilation, but the program still crashes.

So I need help with understanding the crash dump. This is given
below:

Exiting due to SIGSEGV
General protection fault at eip = 00002380

eax=01da2724 ebx=001190e4 ecx=001190e4
edx=00078500 esi=0011ed54 edi=00119060
ebp=00118fe8 esp=00118f60 program=a:\test.exe

cs: sel=00a7 base=10000000 limit=0012ffff
ds: sel=00af base=10000000 limit=0012ffff
es: sel=00af base=10000000 limit=0012ffff
fs: sel=00bf base=00000000 limit=0010ffff
gs: sel=00bf base=00000000 limit=0010ffff
ss: sel=00af base=10000000 limit=0012ffff

App stack: [0011912c..0009912c]
Exception stack: [00099080..00097140]

Call frame traceback EIPs:
0x00002380
0x000024a7
0x000094d3
0x0000267d
0x0003aa08

Btw, the program is written in C using the DJGPP compiler (GCC
for DOS) and compiled on a xp computer. Then I transfer the
program on a floppy to my DOS box, and run it - where it crashes.
Can it have anything to do with this XP->DOS transfer with subtly
differing exe formats.


You are off-topic in c.l.c, which does not deal with compiler or
system specific things, but only the portable language. You have
shown no code. If you had included a minimal compilable program
that exhibited the problem, and was written in standard C, your
question would be topical.

At any rate I have set follow-ups and cross-posted to
comp.os.msdos.djgpp. Go there for any answers.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #3
arizvi wrote:
Hi,

My program crashes when it reaches a certain line. There is nothing
wrong with that particular line as I have changed it to something
simple like i=0, and it still crashes.

If I remove some paras of code from lines previous to this line, the
program run fine and does not crash. So I think that this has to do
with some kind of overflow. It seems to me that if the number of lines
of code accessed by my program goes above a limit, it crashes. So I
tried reducing the size of my program by removing the debug info during
compilation, but the program still crashes.

So I need help with understanding the crash dump. This is given below:

Exiting due to SIGSEGV
General protection fault at eip = 00002380

This means that yhe program counter registerwas at 0x2380
when the fault occurred.
Now, you have to find out to which line of code corresponds
to that address.

There are several methods of finding that information:
1:
call the linker with some "map" option, that will print
a map of the gegerated program, specifying at which address
all procedures are loaded. Then you have to find 0x2380 in that
list of procedures.

2: Use some debugger to load the program in memory and try to
find out the addresses that are nearest to 0x2380.
eax=01da2724 ebx=001190e4 ecx=001190e4
edx=00078500 esi=0011ed54 edi=00119060
ebp=00118fe8 esp=00118f60 program=a:\test.exe

All those registers do not tell you much about the crash unless
you have pinned down the exact disassembly of the instruction
provoking the crash. In that case, it will allow you
to see which variables were involved in the crash. To read
that though, you will need a good knowledge of assembly language.
cs: sel=00a7 base=10000000 limit=0012ffff
ds: sel=00af base=10000000 limit=0012ffff
es: sel=00af base=10000000 limit=0012ffff
fs: sel=00bf base=00000000 limit=0010ffff
gs: sel=00bf base=00000000 limit=0010ffff
ss: sel=00af base=10000000 limit=0012ffff

App stack: [0011912c..0009912c]
Exception stack: [00099080..00097140]

Call frame traceback EIPs:
0x00002380
0x000024a7
0x000094d3
0x0000267d
0x0003aa08

This is a bonus information and very useful. You repeat the
steps you did to find out which procedure corresponds to
0x2380 and apply it to 0x24a7, 0x94d3, etc, and you will
be able to restitute the whole stack as it was when the
exception happened.
Btw, the program is written in C using the DJGPP compiler (GCC for DOS)
and compiled on a xp computer. Then I transfer the program on a floppy
to my DOS box, and run it - where it crashes. Can it have anything to
do with this XP->DOS transfer with subtly differing exe formats.


Unlikely since if the exe format was wrong, the program wouldn't be
loaded at all.
Nov 14 '05 #4
Hi Jacob,

Thanks for your reply. I was able to find the source of error. It was
due to incorrect initialization.
The source of error was hard to debug, since the program had undefined
behavior - it crashed at different locations on different runs of the
program.

Thanks guys,
Ahmad

Nov 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1564
by: Christoph Pingel | last post by:
Can anybody tell me what's going on here (or give me a pointer where to start looking): Nov 22 18:05:03 localhost crashdump: Unable to determine CPSProcessSerNum pid: 1230 name: python This...
0
820
by: Yadnesh | last post by:
Hi, I have a working application compiled on VC++ 6.0. It is linked using the linker flags: -debug -debugtype:both Now, I want to compile and run the application in the .NET framework. I...
2
2192
by: Mark Loveless | last post by:
Back in my mainframe days a crash dump could be parsed by hand to reveal the application program running at crash time as well as the offset into said program, which combined with a extended...
3
2836
by: Cheung, Jeffrey Jing-Yen | last post by:
Hi all, I need some help with debugging a "deadlock" in a production environment. I've managed to get a crash dump and have tried to analyzed it via WinDbg and SOS. Unfortunately, I am not...
0
1142
by: zhengfish | last post by:
Hi, all, my server crashed at odbc my_strcasecmp_8bit(). OS: redhat linux 9.0, DB: MySQL-server-4.1.14-0.glibc23,MyODBC-3.51.11-2, unixODBC-2.2.3-6 I guessed it caused by odbc driver. but how...
8
1765
by: Abubakar | last post by:
Hi, I want to know that when my application is running outside of the debugger (in debug or release build) can I set the application/project settings in a way that when it crashes it tells me...
5
4251
by: matt287 | last post by:
Hi, I am tracing this c program and I know nothing about this x_DUMP code. Can somebody explain to me ? Thanks. /* header */ # include <stdlib.h> # if x _DUMP # include <stdio.h> # endif
3
2617
by: ycinar | last post by:
Can anyone advise on how to open a crash dump in Visual Studio?
2
276
by: Bob Altman | last post by:
I have an application that runs a bunch of programs. Occasionally, one of the programs dies a horrible death due to a coding error of some sort in the program. As things are configured today,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7495
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.