10 More Discussions You Might Find Interesting
1. Programming
Hello,
This function was copied into my code, which was compiled without error/warning, but when executed there is always Segmentation fault at the end after the output (which seems correct!):
void get_hashes(unsigned int hash, unsigned char *in)
{
unsigned char *str = in;
int pos =... (7 Replies)
Discussion started by: yifangt
7 Replies
2. Programming
I am trying to reverse complement DNA sequence (string) with a short c++ code using boost library. Code was compiled without any warning/error, but ran into Segmentation fault.
My guess is the function to return a vector, but not sure.
#include <iostream>
#include <fstream>
#include <string>... (14 Replies)
Discussion started by: yifangt
14 Replies
3. 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
4. Programming
I always get segment fault, why? can sb help me and modify it, I have spend on much time on
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <string.h>
#define MAX 10
pthread_t thread;
void *thread1()
{
int *a;
int i, n;
... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
5. Programming
Hi,
Whether the following piece of code is placed in the read-only memory of code (text) segment or data segment?
char *a = "Hello";
I am getting two different answers while searching in google :( that's why the confusion is (7 Replies)
Discussion started by: royalibrahim
7 Replies
6. Programming
Hi all
In the ltp-posix test,there is a case in open_posix_testsuite\conformance\interfaces\timer_gettime\speculative/6-1.c
I run the above code,it will has a segment fault, if I modify it to below,it works well
Anybody can tell me why? (1 Reply)
Discussion started by: yanglei_fage
1 Replies
7. HP-UX
Hi!
I'm linking my hpux code using -lpthread (gcc), yet it references libpthread_tr.1,
the debug version of the pthread lib. How do I force it to use pthreads?
Thanks, :) (3 Replies)
Discussion started by: zackz
3 Replies
8. Programming
When run it, segment fault.
What is wrong?
#include <stdio.h>
#include <stdlib.h>
const int max =20;
//****************************************************
// Input Matrix
//****************************************************
void inMatrixAA(int *AA, int row, int col)... (9 Replies)
Discussion started by: zhshqzyc
9 Replies
9. Programming
Does any one no of some good web site which will explain about how to program using pthreads in a UNIX enviroment? (6 Replies)
Discussion started by: fishman2001
6 Replies
10. UNIX for Advanced & Expert Users
Can anyone explain me how to use pthread_key_create() , pthread_setspecific(), pthread_getspecific() and pthread_key_delete () routines in pthreads.
Kindly state by an example. (3 Replies)
Discussion started by: S.P.Prasad
3 Replies