Need help about Segmentation fault
I can run this code in Linux PC. but after cross compilation and run it in ARM target board, i met Segmentation fault. I used GDB to check the traceback, but couldn't get the actual source line number.
How can i solve the segmentation fault. Below is my operation: 1. cross compilation: Code:
arm-linux-gcc -g -o test test.c 3. run Code:
./test Code:
Program received signal SIGSEGV, Segmentation fault. Code:
#include<stdio.h> |
Hi -
Change "system(lg)" to "printf ("strlen (lg): %d\n", strlen (lg));" ... and you'll see the string happens to be 73+1 bytes (exceeding the 64 bytes you've allocated). 'Hope that helps .. PSM |
Thanks! PSM
Quote:
|
All times are GMT -5. The time now is 10:13 PM. |