I'm wondering if this could be a memory management/kernel issue or perhaps a
gcc one.
Here is a snippet of the code which is causing the SIGSEG (there are other
similar ones):
char hlp[300], *hlp2;
hlp[299]=0;
strncpy(hlp,optarg,299);
hlp2=(char *)strtok(hlp,":");
IP[255]=0;
strncpy(IP,hlp2,255);
the last strncpy() is causing the fault. Any access (with a printf or whatever)
to the memory location pointed to by hpl2 causes the fault.
Note that, as expected, hlp2==hlp but hlp can be accessed (for instance with a
strncpy(IP,hlp,255)) without causing any fault
, hlp2 not!?
Both Alessio and I have the 64 bits ubuntu.
** Changed in: linux-source-2.6.20 (Ubuntu)
Sourcepackagename: glibc => linux-source-2.6.20
--
Segmentation Fault
https://bugs.launchpad.net/bugs/107180
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs