Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-08-2012, 07:08 PM   #1
LQ Newbie
Registered: Mar 2010
Posts: 14

Rep: Reputation: 0
not getting any core dump


I am using Ubuntu Maverick 64 bit.

Pl. look at the following c++ program

This program suppose to crash bcos a number is being divided by zero -

#include <iostream>

using namespace std;

int divint(int, int);

int main() {it
int x = 5, y = 2;
cout << divint(x, y);
x =3; y = 0;
cout << divint(x, y);
return 0;

int divint(int a, int b)
return a / b;

When I compile with g++ and execute it just throws floating point exception, does not core dump. Why?

I need the core dump. Should I look elsewhere to get the core dump?
Old 04-09-2012, 12:57 PM   #2
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Check your ulimit with: ulimit -a

If the core file size is set to 0, adjust it with:

ulimit -c unlimited
1 members found this post helpful.
Old 04-09-2012, 06:49 PM   #3
LQ Newbie
Registered: Mar 2010
Posts: 14

Original Poster
Rep: Reputation: 0
Dear crabboy,

Thank you, Yeah! I got the core dump.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Core Dump on Solaris (Question about core file) dayalan_cse Solaris / OpenSolaris 5 12-29-2014 07:56 AM
Creating a core dump from raw ram dump? cyent Programming 2 08-15-2010 05:57 PM
Core dump issues. Program crashes but does not generate core dump file sabeel_ansari Programming 1 10-07-2009 04:23 PM
Core dump in Ubuntu 8.04 (Empty core file) vineet7kumar Linux - Newbie 1 01-17-2009 05:52 PM
core dump lacrimae Linux - General 3 02-19-2002 01:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration