P
peng qiu
Hi, I met "core" in my program. Help needed to review my source code.
Detail environment:
OS: AIX 5.2.0.0 (64bit)
Complier: VisualAge C 6
-----example.c-----------
#include <stdio.h>
int main()
{
int i = 0;
char *p = "abcd";
for (i = 0; i < 10000; i++) {
printf("p[%d] = %d\n", i, p);
}
}
when i reached 2750, program coredump.
I know that "write" can result in segmentation fault, what about
"read"?
Thank you very much for your help.
Detail environment:
OS: AIX 5.2.0.0 (64bit)
Complier: VisualAge C 6
-----example.c-----------
#include <stdio.h>
int main()
{
int i = 0;
char *p = "abcd";
for (i = 0; i < 10000; i++) {
printf("p[%d] = %d\n", i, p);
}
}
when i reached 2750, program coredump.
I know that "write" can result in segmentation fault, what about
"read"?
Thank you very much for your help.