[GRASS-dev] Re: [GRASS GIS] #746: v.out.ascii with column
parameter: segfault
GRASS GIS
trac at osgeo.org
Wed Sep 9 19:31:54 EDT 2009
#746: v.out.ascii with column parameter: segfault
----------------------+-----------------------------------------------------
Reporter: neteler | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 6.4.0
Component: Vector | Version: 6.4.0 RCs
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by hamish):
I get a bit more out of valgrind,
{{{
==28766== Conditional jump or move depends on uninitialised value(s)
==28766== at 0x4C22D89: strlen (mc_replace_strmem.c:242)
==28766== by 0x7356CB0: vfprintf (in /lib/libc-2.7.so)
==28766== by 0x7357B5F: (within /lib/libc-2.7.so)
==28766== by 0x7353435: vfprintf (in /lib/libc-2.7.so)
==28766== by 0x52A8270: G_debug (debug.c:83)
==28766== by 0x591A98F: db_select_value (select.c:230)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
==28766==
==28766== Conditional jump or move depends on uninitialised value(s)
==28766== at 0x4C22D98: strlen (mc_replace_strmem.c:242)
==28766== by 0x7356CB0: vfprintf (in /lib/libc-2.7.so)
==28766== by 0x7357B5F: (within /lib/libc-2.7.so)
==28766== by 0x7353435: vfprintf (in /lib/libc-2.7.so)
==28766== by 0x52A8270: G_debug (debug.c:83)
==28766== by 0x591A98F: db_select_value (select.c:230)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
==28766==
==28766== Syscall param write(buf) points to uninitialised byte(s)
==28766== at 0x73D09F0: write (in /lib/libc-2.7.so)
==28766== by 0x737E909: _IO_file_write (in /lib/libc-2.7.so)
==28766== by 0x737E569: (within /lib/libc-2.7.so)
==28766== by 0x737E84D: _IO_file_xsputn (in /lib/libc-2.7.so)
==28766== by 0x7357C09: (within /lib/libc-2.7.so)
==28766== by 0x7353435: vfprintf (in /lib/libc-2.7.so)
==28766== by 0x52A8270: G_debug (debug.c:83)
==28766== by 0x591A98F: db_select_value (select.c:230)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
==28766== Address 0x7feffcc6a is on thread 1's stack
==28766==
==28766== Conditional jump or move depends on uninitialised value(s)
==28766== at 0x507E6BF: db_enlarge_string (string.c:113)
==28766== by 0x507E657: set_string (string.c:92)
==28766== by 0x507E588: db_set_string (string.c:35)
==28766== by 0x507E8AA: db_copy_string (string.c:214)
==28766== by 0x507F546: db_copy_value (value.c:319)
==28766== by 0x591A9BB: db_select_value (select.c:235)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
==28766==
==28766== Use of uninitialised value of size 8
==28766== at 0x4C22DFC: strcpy (mc_replace_strmem.c:268)
==28766== by 0x507E678: set_string (string.c:95)
==28766== by 0x507E588: db_set_string (string.c:35)
==28766== by 0x507E8AA: db_copy_string (string.c:214)
==28766== by 0x507F546: db_copy_value (value.c:319)
==28766== by 0x591A9BB: db_select_value (select.c:235)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
==28766==
==28766== Invalid write of size 1
==28766== at 0x4C22DFC: strcpy (mc_replace_strmem.c:268)
==28766== by 0x507E678: set_string (string.c:95)
==28766== by 0x507E588: db_set_string (string.c:35)
==28766== by 0x507E8AA: db_copy_string (string.c:214)
==28766== by 0x507F546: db_copy_value (value.c:319)
==28766== by 0x591A9BB: db_select_value (select.c:235)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
==28766== Address 0x7ffffffff is not stack'd, malloc'd or (recently)
free'd
==28766==
==28766== Process terminating with default action of signal 11 (SIGSEGV)
==28766== Access not within mapped region at address 0x7FFFFFFFF
==28766== at 0x4C22DFC: strcpy (mc_replace_strmem.c:268)
==28766== by 0x507E678: set_string (string.c:95)
==28766== by 0x507E588: db_set_string (string.c:35)
==28766== by 0x507E8AA: db_copy_string (string.c:214)
==28766== by 0x507F546: db_copy_value (value.c:319)
==28766== by 0x591A9BB: db_select_value (select.c:235)
==28766== by 0x402473: bin_to_asc (b2a.c:217)
==28766== by 0x40310A: main (out.c:185)
664070.15136424|5103723.69345589|1
==28766==
==28766== ERROR SUMMARY: 8 errors from 6 contexts (suppressed: 20 from 2)
==28766== malloc/free: in use at exit: 23,975 bytes in 131 blocks.
==28766== malloc/free: 292 allocs, 161 frees, 47,116 bytes allocated.
==28766== For counts of detected errors, rerun with: -v
==28766== searching for pointers to 131 not-freed blocks.
==28766== checked 2,826,664 bytes.
==28766==
==28766== LEAK SUMMARY:
==28766== definitely lost: 369 bytes in 16 blocks.
==28766== possibly lost: 58 bytes in 1 blocks.
==28766== still reachable: 23,548 bytes in 114 blocks.
==28766== suppressed: 0 bytes in 0 blocks.
==28766== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault
}}}
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/746#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list