12-22-2003
SIGSEGV problem
Hi.
Can someone to help me in a segfault problem?
I have a big C++ program that crash from time to time because it receive the SIGSEGV signal.
So my question is: Can I find, without using gdb or other debugging tools, which line from source code cause that problem? Or if exist some gdb API that I could use from source code to determine the problem?
Or if you guys know some other solutions to my problem please let me know about it.
Any help is appreciate.
Thanks a lot.
10 More Discussions You Might Find Interesting
1. Programming
Here is my initiating code:
#define NUM 20
static struct tab {
int count;
int use;
} tab;
int curtab = 0;
int tab_create(int tab_count)
{
curtab++;
tab.use = 1;
tab.count = tab_count;
kprintf("here!");
return curtab;
} (2 Replies)
Discussion started by: micmac700
2 Replies
2. Programming
Dear all,
I used debugger from C++ and these are the message I got:
Program received signal SIGSEGV, Segmentation fault.
0x00323fc0 in free () from /lib/tls/libc.so.6
(gdb) info s
#0 0x00323fc0 in free () from /lib/tls/libc.so.6
#1 0x00794fa1 in operator delete () from... (5 Replies)
Discussion started by: napapanbkk
5 Replies
3. Programming
Hi
I am getting a strange segmentation fault during the unwind
process. I am trying to throw an object of an Exception class.
During the DoThrow (in libC.a) the stack starts growing until a
Signal is received.
The object thrown is of a class that inherits from a common class,
and the signal... (0 Replies)
Discussion started by: barak
0 Replies
4. Programming
Consider the following program.
int main(){
struct a_t {
int *a;
unsigned char b;
unsigned char c;
unsigned char d;
} A;
unsigned char e;
unsigned char f;
unsigned char g;
g = 1;
A.a = (int *)&g; -> Memory misalignment... (1 Reply)
Discussion started by: balaji280283
1 Replies
5. Programming
i wrote handler for sigsegv such that i can allocate memory for a variable to which
sigsegv generated for illlegal acces of memory.
my code is
#include <signal.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
char *j;
void segv_handler(int dummy)
{
j=(char *)malloc(10);
... (4 Replies)
Discussion started by: pavan6754
4 Replies
6. UNIX and Linux Applications
Hello,
Can anybody tell me how can i handle segmentation fault signal, in C code? (2 Replies)
Discussion started by: mustus
2 Replies
7. AIX
Hello,
One of our customer is getting segmentation fault when he runs his shell script which invokes our executable on AIX 6.1.
On AIX 5.3, there were no issues.
Here is the truss output.
811242: __loadx(0x0A040000, 0xF0D3A26C, 0x00000000, 0x00000009, 0x00000000) = 0xF026E884... (0 Replies)
Discussion started by: erra_krishna
0 Replies
8. Solaris
I receive a sigsegv failure. I was under the impression that a core file is created everytime a sigsegv occurrs and the process is terminated. I have had two recent occurrances of a core file not being created. Does anyone know why a core file would not be created. (2 Replies)
Discussion started by: amp4cats
2 Replies
9. UNIX for Advanced & Expert Users
Hi
I want to create a SIGSEGV when program tries to access one particular area in memory. Is this possible. If so whats the command. (4 Replies)
Discussion started by: jionnet
4 Replies
10. Programming
The problem: I need to work with large arrays and after one of my structures grew in size my program started getting segmentation fault.
My code where I allocate the arrays:
static R1 *tarr;
static R2 *rarr;
proc_init_mem()
{
const int t_sz = sizeof(R1) *... (9 Replies)
Discussion started by: migurus
9 Replies