execution failure and core dump generation


 
Thread Tools Search this Thread
Top Forums Programming execution failure and core dump generation
# 1  
Old 06-01-2009
execution failure and core dump generation

Hi, I am running a c++ program in unix sun OS 5.9. There are two functions in a file which are being used by a third function in the same file. the two functions being used are of the same type. one function is returning a success and the control is redeemed by the calling function. for teh second function, it is executing fine and is returning a success, but the control is not taken back by the caliing function and a core dump is getting generated. what can be the reason ?

details of functions:
calling function :
int lnClassType::updateDP(updatestruct lupdatestruct, localstruct llocalstruct)
{
retVal = validateDP(lupdatestruct);
if ( FAILURE == updateDP( lupdatestruct,localstruct)) {
return FAILURE;
}
}

called functions:
int limitnodeClassType::validateDrwngPower(updatestruct lupdatestruct, localstruct llocalstruct)
int limitnodeClassType::updateAcctDrwngPower(updatestruct lupdatestruct, localstruct llocalstruct)

function validateDP is goin thru fine. UpdateDP is giving the core. Included logs to find out wer exactly the execution is stopping. Found that updateDP is returning success, but the value is not being caught at the calling function and exectuin is stopping there. plz help.

please suggest a solution for this.
# 2  
Old 06-01-2009
The code for validateDP and updateDP is probably relevant. That it returns doesn't mean it isn't corrupting the stack, for example.
# 3  
Old 06-02-2009
But the function validateDP has never given any error or core. the execution stops and core generation happens at updateDP only. logs prove that the function is executed and is reching till the return success statement of the function. but the success value is not getting returned to the calling function. thats where the execution stops.
# 4  
Old 06-03-2009
I think the problem in this part of code :
Code:
if ( FAILURE == updateDP( lupdatestruct,localstruct)) {
return FAILURE;
}

because if the
Code:
if

statement not satisfied ,the excusion
will not end due to the recursive loop ,so Segmentation Fault(coredump) will be occured.
# 5  
Old 06-03-2009
Is this a typo or is it really your code?
Code:
if ( FAILURE == updateDP( lupdatestruct,localstruct)) {

Should "localstruct" not be "llocalstruct"?
# 6  
Old 06-05-2009
I am very sorry.. Its a huge typo.. Smilie Smilie
details of functions:
calling function :
int lnClassType::updateDP(updatestruct lupdatestruct, localstruct llocalstruct)
{
retVal = validateDP(lupdatestruct,llocalstruct);
if ( FAILURE == updateAcctDP( lupdatestruct,localstruct)) {
return FAILURE;
}
}

called functions:
int limitnodeClassType::validateDP(updatestruct lupdatestruct, localstruct llocalstruct)
int limitnodeClassType::updateAcctDP(updatestruct lupdatestruct, localstruct llocalstruct)

.. this is the code flow..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Core File Generation

Hi I am using Linux and I am using Java as well as C++ services running on it. The ulimit -c is set to around 400Mb. Whenever any of the service fails they produce a core file.(Actual size of core could be greater than 400Mb). Whenever my Java service fails I get a core file of size 400Mb... (3 Replies)
Discussion started by: Raj999
3 Replies

2. AIX

core dump generation in IBM machine

Hi, im getting a core dump file in a AIX machine while using a complex c++ program. The same program is working without any core error in another system with sun OS 5.9. The program has used structs, LL's and lots of call by references. What may be the reason. will it be a problem with the OS ? (3 Replies)
Discussion started by: suresh_kb211
3 Replies

3. Programming

mysterious execution failure and core dump generation

Posting again, as previous query had a typo. ======================================================= Hi, I am running a c++ program in unix AIX machine. There are two functions in a file which are being used by a third function in the same file. the two functions being used are of the same type.... (1 Reply)
Discussion started by: suresh_kb211
1 Replies

4. Programming

execution failure and core dump generation

Hi, I am running a c++ program in unix sun OS 5.9. There are two functions in a file which are being used by a third function in the same file. the two functions being used are of the same type. one function is returning a success and the control is redeemed by the calling function. for teh second... (2 Replies)
Discussion started by: suresh_kb211
2 Replies

5. Solaris

Core dump generation in sun OS

Hi, im getting a core dump file in my sun OS version 5.9 while using a complex c++ program. The same program is working without any core error in another system with same sun OS and same version. The program has used structs, LL's and lots of call by references. What may be the reason. will it be a... (3 Replies)
Discussion started by: suresh_kb211
3 Replies

6. Programming

core dump

how to view core dumped file using gdb and how to extract information from the coredumped file.can we get similar information from the other utilites like strace or ptrace. (2 Replies)
Discussion started by: Manabhanjan
2 Replies

7. AIX

core dump

My application gives core dump. When i am debugging with dbx getting instructions below: pthdb_session.c, 818: 695445 PTHDB_INTERNAL (internal error) pthreaded.c, 1941: PTHDB_INTERNAL (internal error) Illegal instruction (illegal opcode) in . at 0x0 warning: Unable to access address 0x0... (1 Reply)
Discussion started by: bapi
1 Replies

8. UNIX for Advanced & Expert Users

Core Dump

Hello all, Iam new to unix while executing java program which finely working in windows know iam testing with unix ,but in unix while executing iam getting core dump, my application is in client server environment and it is menu drivrn application on clicking options no problem but after some time... (1 Reply)
Discussion started by: vinp
1 Replies

9. UNIX for Dummies Questions & Answers

core dump

I've got a core dump in my weblogic home directory, which i have tried to debug by initiating savecore from /etc/init.d/savecore start but savecore failed to create the two files, that is vmcore.n and vmunix.n. savecore is enable on my server to save vmcore and vmunix in /var/crash/hostname 1)... (4 Replies)
Discussion started by: hassan2
4 Replies

10. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies
Login or Register to Ask a Question