Mark
2010-09-30 13:59:12 UTC
[Linux 2.6.18, GCC 4.1.2]
I have a really weird segmentation fault on a C program. I have a
line like this:
strcat(stringVariable, "_");
And it crashes with a segmentation fault. All the time. The same
program works fine on Solaris and AIX.
stringVariable is plenty big enough to accomodate an extra character.
(It contains a 7 character string and it is 1K in size.) I have run
it under the debugger to verify this. I have also run in under purify
which doesn't tell me anything useful.
I know that the compiler is old but it is not my decision to update
it.
Any ideas?
I have a really weird segmentation fault on a C program. I have a
line like this:
strcat(stringVariable, "_");
And it crashes with a segmentation fault. All the time. The same
program works fine on Solaris and AIX.
stringVariable is plenty big enough to accomodate an extra character.
(It contains a 7 character string and it is 1K in size.) I have run
it under the debugger to verify this. I have also run in under purify
which doesn't tell me anything useful.
I know that the compiler is old but it is not my decision to update
it.
Any ideas?
--
(\__/) M.
(='.'=) Due to the amount of spam posted via googlegroups and
(")_(") their inaction to the problem. I am blocking some articles
posted from there. If you wish your postings to be seen by
everyone you will need use a different method of posting.
(\__/) M.
(='.'=) Due to the amount of spam posted via googlegroups and
(")_(") their inaction to the problem. I am blocking some articles
posted from there. If you wish your postings to be seen by
everyone you will need use a different method of posting.