02-27-2010
Quote:
Originally Posted by
Jess83
Anyone as a clue why my program returns a segmentation fault on Ubuntu but not on Gentoo? I dumped the core and check the output through gdb.
The whole program run fine all the way down and does what its suposed to do up till where its suposed to exit then it crash to segmentation fault instead of exiting... but only on Ubuntu 9.10 not Gentoo which are the 2 distros i tested so far?!?!?!
From my experience, it usually means that your program has a bug, and that you were lucky enough on Gentoo that the bug doesn't appear. Chances are tiny that it is actually a ubuntu problem.
Did you tried to run your program under valgrind?
HTH,
Loïc.
10 More Discussions You Might Find Interesting
1. Programming
Hi,
Why I don't receive a segmentation fault in the following sample.
int main(void)
{
char buff;
sprintf(buff,"Hello world");
printf("%s\n",buff);
}
If I define a buffer of 10 elements and I'm trying to put inside it twelve elements, Should I receive a sigsev... (22 Replies)
Discussion started by: lagigliaivan
22 Replies
2. UNIX for Dummies Questions & Answers
Hi,
While comparing primary key data of two tables thr bteq script I am getting this Error. This script is a shell script.
*** Error: The following error was encountered on the output file.
Script.sh: 3043492 Segmentation fault(coredump)
Please let me know how to get through it.
... (5 Replies)
Discussion started by: monika
5 Replies
3. Programming
If I do this.
Assume
struct life
{
char *nolife;
}
struct life **life;
// malloc initialization & everything
if(life->nolife == 0)
Would I get error at life->nolife if it is equal to 0.
wrong accession? (3 Replies)
Discussion started by: joey
3 Replies
4. Programming
I'm getting a segmentation fault. I'm new to Linux programming. Thanks so much for all of your input.:eek:
#include </usr/include/mysql++/mysql++.h>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <string.h>
using namespace std;
int outputToImport(const char*... (1 Reply)
Discussion started by: sepoto
1 Replies
5. Programming
i have this code
int already_there(char *client_names, char *username) {
int i;
for(i = 0; i<NUM; i++) {
printf("HERE\n");
if (strcmp(client_names, username)==0) return(1);
}
return(0);
}
and i get a segmentation fault, whats wrong here? (7 Replies)
Discussion started by: omega666
7 Replies
6. Ubuntu
Hi,
Operating System: Ubuntu 10.04
Other Packages Installed: freetds,DBI,DBD-Sybase
I am trying to connect to SYBASE using perl programming..But the moment I am executing my perl program it throws a SEGMENTATION FAULT error.
I have attached strace output for the same...
Thanks for... (1 Reply)
Discussion started by: vnkatara
1 Replies
7. Programming
I use a binary name (ie polo) it gets some parameter , so for debugging normally i do this :
i wrote script for watchdog my app (polo) and check every second if it's not running then start it , the problem is , if my app , remain in state of segmentation fault for a while (ie 15 ... (6 Replies)
Discussion started by: pooyair
6 Replies
8. Solaris
Hi Guys,
I just installed and booted a zone called testzone. When I logged in remotely and tried changing to root user I get this error:
"Segmentation fault"
Can someone please help me resolve this?
Thanks alot (2 Replies)
Discussion started by: cjashu
2 Replies
9. Programming
I keep getting this fault on a lot of the codes I write, I'm not exactly sure why so I'd really appreciate it if someone could explain the idea to me.
For example this code
#include <stdio.h>
main()
{
unsigned long a=0;
unsigned long b=0;
int z;
{
printf("Enter two... (2 Replies)
Discussion started by: sizzler786
2 Replies
10. Programming
Oddities with gcc, 2.95.3 for the AMIGA and 4.2.1 for MY current OSX 10.14.1...
I am creating a basic calculator for the AMIGA ADE *NIX emulator in C as it does not have one.
Below are two very condensed snippets of which I have added the results inside the each code section.
IMPORTANT!... (11 Replies)
Discussion started by: wisecracker
11 Replies
LEARN ABOUT DEBIAN
gen_keymap
GEN_KEYMAP(1) Ubuntu General Commands Manual GEN_KEYMAP(1)
NAME
gen_keymap -- generate a keyboard map decision tree
SYNOPSIS
gen_keymap list ...
DESCRIPTION
gen_keymap generates a decision tree from a set of keyboard maps which can be used to help a user decide which keyboard map to use. The pro-
gram using the decision tree typically asks the user to press some keys; at each step, it examines the returned keycode and uses it to prune
the list of possible keyboard maps until there is only one left.
OPTIONS
--version
Show program's version number and exit.
-?, --help
Show help text.
-v, --verbose
Be more verbose.
-mMINLEN, --minlen=MINLEN
Too-short keymaps are skipped (default: 30 entries).
-g, --graph
Generate a hopefully-nice-looking .dot file.
--maps
Print the to-be-processed keymaps
-i, --installer
Input files are in d-i map form.
-IDIRS, --inc=DIRS, --include=DIRS
Add a directory to the search path.
-oFILENAME, --output=FILENAME
Set output file (default: stdout).
-fFILTER, --filter=FILTER
Include only the branches leading to these keymaps.
-uUSEONLY, --useonly=USEONLY
Start generating the tree based only on these keymaps. (The difference between --filter and --useonly is that the former generates the
whole tree and then prunes it, while the latter only generates a reduced tree to begin with. This may have implications for perfor-
mance on large trees.)
-sSKIP, --skip=SKIP
Keymaps to skip.
-t, --test
Test the generated maps.
--interactive
Ask user to choose among indistinguishable keymaps.
AUTHORS
gen_keymap was written by Matthias Urlichs <smurf@debian.org>. This manual page was written by Colin Watson <cjwatson@ubuntu.com>.
Ubuntu September 5, 2006 Ubuntu