08-30-2006
Segmentation Fault at sqlcxt
Hi all,
After compiling my Pro-c program, while trying to run it I am receving segmentation violation at-
sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
The exact error is-
Program received signal SIGSEGV, Segmentation fault.
0x7af99090 in _sigfillset+0x5c0 () from /usr/lib/libc.2
following is the Backtrace of the core file thru gdb-
/opt/langtools/bin/gdb /home/vs9178/cms/bin/edget core
HP gdb 3.2 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 3.2 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `edget'.
Program terminated with signal 11, Segmentation fault.
warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
#0 0xc0198090 in _sigfillset+0x5c0 () from /usr/lib/libc.2
(gdb) bt
#0 0xc0198090 in _sigfillset+0x5c0 () from /usr/lib/libc.2
#1 0xc0195bbc in _sscanf+0x68c () from /usr/lib/libc.2
#2 0xc019b294 in malloc+0x18c () from /usr/lib/libc.2
#3 0xcdeb4f6c in sltstidinit+0x18 () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#4 0xcde65774 in lxhLangEnv+0x5c () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#5 0xcde64b74 in lxhnlangid+0x34 () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#6 0xcd679150 in sqgctx+0x2d0 () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#7 0xcd678dcc in sqgrct+0x50 () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#8 0xcd668008 in sqlcmex+0x370 () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#9 0xcd6685cc in sqlcxt+0x78 () from /usr/local/opt/oracle/product/acmdb01d/lib32/libclntsh.sl.9.0
#10 0x2981c in check_out_ok (project=0x40029668 "acm", release=42, dir=0x401d2628 "uc/clf", flnm=0x401d268c "try.c")
at cms_get.c:1994
#11 0x2a174 in edit_one_source (cms_project=0x40029668 "acm", cms_release=42, dir=0x401d2628 "uc/clf",
flnm=0x401d268c "try.c", target_dir=0x400ddd50 "/home/vs1111@\002\362\327\017\017\377", target_flnm=0x400ddd68 "try.c",
mr=5307, cr=1) at cms_get.c:2300
#12 0x2a59c in edget (argc=5, argv=0x7f7f0a34) at cms_get.c:2409
#13 0x56c40 in main (argc=5, argv=0x7f7f0a34) at main.c:145
(gdb) quit
Any help in this regard is highly appreciated.
TIA.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hello all,
I tried a program on an array to intialise array elements from the standard input device.it is an integer array of 5 elements.but after entering the 4th element it throws a message called "Segmentation Fault" and returns to the command prompt without asking for the 5th element.
... (3 Replies)
Discussion started by: compbug
3 Replies
2. Linux
Hi,
on a linux Red HAT(with Oracle DB 9.2.0.7) I have following error :
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
using channel ORA_DISK_1
Segmentation fault
What does it mean ? And the solution ?
Many thanks. (0 Replies)
Discussion started by: big123456
0 Replies
3. 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
4. Programming
What is segmentation fault(core dumped) (1 Reply)
Discussion started by: gokult
1 Replies
5. 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
6. Programming
This code is causing a segmentation fault and I can't figure out why. I'm new to UNIX and I need to learn how to avoid this segmentation fault thing. Thank you so much. Thanks also for the great answers to my last post.:):b:
int main()
{
mysqlpp::Connection conn(false);
if... (3 Replies)
Discussion started by: sepoto
3 Replies
7. 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
8. 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
9. Homework & Coursework Questions
this is a network programming code to run a rock paper scissors in a client and server.
I completed it and it was working without any error. After I added the findWinner function to the server code it starts giving me segmentation fault.
-the segmentation fault is fixed
Current problem -Also... (3 Replies)
Discussion started by: femchi
3 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
strlen(3) Library Functions Manual strlen(3)
NAME
strlen - Finds the length of a string
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <string.h>
size_t strlen( const char *s);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
strlen(): ISO C, XPG4
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies the string.
DESCRIPTION
The strlen() function returns the number of bytes in the string pointed to by the s parameter. The string length value does not include the
terminating null character.
Note
If you pass a NULL pointer as the const char * parameter to the strlen function, the function generates a segmentation violation. To avoid
the segmentation violation and cause the function to return 0 (zero), change the NULL pointer treatment for the process before issuing the
call to the strlen function, as follows: Include the system header file sys/uswitch.h. Call the uswitch function, as described in the
uswitch(2) reference page.
The following program illustrates this procedure:
#include <stdio.h> #include <sys/types.h> #include <sys/uswitch.h>
main() {
size_t retval;
int uswitch_val;
uswitch_val = uswitch(USC_GET,0);
uswitch(USC_SET, uswitch_val | USW_NULLP);
retval = strlen(NULL);
RETURN VALUES
On successful completion, the strlen() function returns the number of characters (bytes) in the string to which the s parameter points.
Current industry standards specify that no value be reserved to indicate an error.
RELATED INFORMATION
Functions: string(3), uswitch(2), wcslen(3)
Standards: standards(5) delim off
strlen(3)