473,324 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

segmentation fault in strlen () from /lib64/libc.so.6

1
Expand|Select|Wrap|Line Numbers
  1.  
  2. BPatch_Vector<BPatch_frame> stack;
  3.                 thrds.at(0)->getCallStack(stack);
  4.                 for( unsigned i = 0; i < stack.size(); i++ ) {
  5.                      char name[ 40 ];
  6.                      BPatch_function * func = stack[i].findFunction();
  7.  
  8.                      if( func == NULL )
  9.                      {
  10.                           strcpy( name, "[UNKNOWN]" );
  11.                      } else {
  12.                           func->getName( name, 40 );
  13.                      }
  14.  
  15.                     cout<<"Function Name = "<<name<<"\t\t PC= "<<stack[i].getPC()<<"\t\tFP = "<< stack[i].getFP()<<"\t\tType = "<<frameTypeString(stack[i].getFrameType())<<endl;
  16.  
  17.  
  18.                 const char* var1=(const char*)(stack[i].getPC());
  19.  
  20.  
  21.  
The above piece of code is giving segmenattion fault. Could you please help in fixing this issue.
Mar 24 '14 #1
1 3962
weaknessforcats
9,208 Expert Mod 8TB
Have you stepped through this with your debugger? You make function calls in the posted code and the segmentation error can come from one of those functions.
Mar 24 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: sivignon | last post by:
Hi, I'm writing a php script which deals with 3 ORACLE databases. This script is launch by a script shell on an linux machine like this : /../php/bin/php ./MySript.php (PHP 4.3.3) My script...
3
by: diyanat | last post by:
i am writing a cgi script in C using the CGIC library, the script fails to run, i am using apache on linux error report from apache : internal server error Premature end of script headers:...
3
by: VB | last post by:
Hi, here File.cpp and File.h: File.cpp: ---------------------- #pragma warning (disable: 4786)
3
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc...
0
by: justarrived | last post by:
Hi, I am working on a Pro-c program on Unix. It compiles/builds properly but while trying to run it I am receiving segmentation violation at- sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn); The...
3
by: madunix | last post by:
My Server is suffering bad lag (High Utlization) I am running on that server Oracle10g with apache_1.3.35/ php-4.4.2 Web visitors retrieve data from the web by php calls through oci cobnnection...
10
by: Linny | last post by:
Hi All, I am pasting a piece of code which executes fine on 32 bit system but fails with a segmentation fault when compiled 64 bit compiler.I am using a HP-UX C compiler on PA-RISC system. This...
4
by: saumya.agarwal | last post by:
Hi, I am executing a piece of code which continually tries to do the sprintf into the allocated buffer on a 64-bit RedHat linux machine. Here are the details of the system and the gcc version...
8
by: Andrea | last post by:
I wrote this code: void * xmalloc (size_t size){ register void *value = OPENSSL_malloc(size); if (value == 0) printf("virtual memory exhausted"); return value; } int _chooseTSK(char*...
1
by: Sharad Maloo | last post by:
Hi, I am running the image file of my project, it is giving following segmentation fault: ERROR----- > Program received signal SIGSEGV, Segmentation fault. 0x004240cb in strlen () from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.