[GRASS-dev] Re: [GRASS GIS] #699: v.buffer segfault: in
Vect_get_isle_points()
GRASS GIS
trac at osgeo.org
Fri Jan 28 16:15:01 EST 2011
#699: v.buffer segfault: in Vect_get_isle_points()
----------------------+-----------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: 6.4.0 RCs
Keywords: v.buffer | Platform: All
Cpu: All |
----------------------+-----------------------------------------------------
Comment(by marisn):
Could this be some int overflow? This is output from 6.5 on AMD64.
{{{
D3/3: Vect_get_area_isle(): area = 2 isle = 19
D3/3: -> isle = 134
D3/3: Vect_get_isle_points(): isle = 134
D3/3: n_lines = 1
D3/3: append line(0) = -976
D3/3: Vect_read_line()
D3/3: V2_read_line_nat(): line = 976
D3/3: Vect__Read_line_nat: offset = 160553
D3/3: type = 4, do_cats = 0 dead = 0
D3/3: n_points = 11
D3/3: off = 160734
D3/3: line n_points = 11
D3/3: isle n_points = 11
D3/3: Vect_get_area_isle(): area = 2 isle = 20
D3/3: -> isle = 137
D3/3: Vect_get_isle_points(): isle = 137
D3/3: n_lines = 1
D3/3: append line(0) = -1002
D3/3: Vect_read_line()
D3/3: V2_read_line_nat(): line = 1002
D3/3: Vect__Read_line_nat: offset = 165931
D3/3: type = 4, do_cats = 0 dead = 0
D3/3: n_points = 11
D3/3: off = 166112
D3/3: line n_points = 11
D3/3: isle n_points = 11
D3/3: Vect_get_area_isle(): area = 2 isle = 21
D3/3: -> isle = 175
D3/3: Vect_get_isle_points(): isle = 175
D3/3: n_lines = 1
D3/3: append line(0) = -1233
D3/3: Vect_read_line()
D3/3: V2_read_line_nat(): line = 1233
D3/3: Vect__Read_line_nat: offset = 206334
D3/3: type = 4, do_cats = 0 dead = 0
D3/3: n_points = 11
D3/3: off = 206515
D3/3: line n_points = 11
D3/3: isle n_points = 11
D3/3: Vect_get_area_isle(): area = 2 isle = 22
==12849== Invalid read of size 4
==12849== at 0x4E43509: Vect_get_area_isle (area.c:288)
==12849== by 0x4E3D64D: Vect_area_buffer2 (buffer2.c:1096)
==12849== by 0x402D6E: main (main.c:478)
==12849== Address 0xdcfc978 is 0 bytes after a block of size 88 alloc'd
==12849== at 0x4C262CA: malloc (in /usr/lib64/valgrind
/vgpreload_memcheck-amd64-linux.so)
==12849== by 0x52A2027: G__realloc (alloc.c:109)
==12849== by 0x5D2BAFE: dig_area_alloc_isle (struct_alloc.c:333)
==12849== by 0x5D27E56: dig_Rd_P_area (plus_struct.c:368)
==12849== by 0x5D25045: dig_load_plus (plus.c:312)
==12849== by 0x4E497C5: Vect_open_topo (open.c:751)
==12849== by 0x4E4A0F2: Vect__open_old (open.c:229)
==12849== by 0x40269A: main (main.c:302)
==12849==
D3/3: -> isle = 0
==12849== Invalid read of size 4
==12849== at 0x4E43521: Vect_get_area_isle (area.c:288)
==12849== by 0x4E3D64D: Vect_area_buffer2 (buffer2.c:1096)
==12849== by 0x402D6E: main (main.c:478)
==12849== Address 0xdcfc978 is 0 bytes after a block of size 88 alloc'd
==12849== at 0x4C262CA: malloc (in /usr/lib64/valgrind
/vgpreload_memcheck-amd64-linux.so)
==12849== by 0x52A2027: G__realloc (alloc.c:109)
==12849== by 0x5D2BAFE: dig_area_alloc_isle (struct_alloc.c:333)
==12849== by 0x5D27E56: dig_Rd_P_area (plus_struct.c:368)
==12849== by 0x5D25045: dig_load_plus (plus.c:312)
==12849== by 0x4E497C5: Vect_open_topo (open.c:751)
==12849== by 0x4E4A0F2: Vect__open_old (open.c:229)
==12849== by 0x40269A: main (main.c:302)
==12849==
D3/3: Vect_get_isle_points(): isle = 0
==12849== Use of uninitialised value of size 8
==12849== at 0x4E43145: Vect_get_isle_points (area.c:118)
==12849== by 0x4E3D65A: Vect_area_buffer2 (buffer2.c:1097)
==12849== by 0x402D6E: main (main.c:478)
==12849==
==12849== Invalid read of size 4
==12849== at 0x4E43145: Vect_get_isle_points (area.c:118)
==12849== by 0x4E3D65A: Vect_area_buffer2 (buffer2.c:1097)
==12849== by 0x402D6E: main (main.c:478)
==12849== Address 0x30 is not stack'd, malloc'd or (recently) free'd
==12849==
==12849==
==12849== Process terminating with default action of signal 11 (SIGSEGV)
==12849== Access not within mapped region at address 0x30
==12849== at 0x4E43145: Vect_get_isle_points (area.c:118)
==12849== by 0x4E3D65A: Vect_area_buffer2 (buffer2.c:1097)
==12849== by 0x402D6E: main (main.c:478)
==12849== If you believe this happened as a result of a stack
==12849== overflow in your program's main thread (unlikely but
==12849== possible), you can try to increase the size of the
==12849== main thread stack using the --main-stacksize= flag.
==12849== The main thread stack size used in this run was 8388608.
==12849==
==12849== HEAP SUMMARY:
==12849== in use at exit: 7,945,280 bytes in 139,148 blocks
==12849== total heap usage: 139,617 allocs, 469 frees, 8,023,374 bytes
allocated
==12849==
==12849== LEAK SUMMARY:
==12849== definitely lost: 4,373 bytes in 13 blocks
==12849== indirectly lost: 240 bytes in 10 blocks
==12849== possibly lost: 0 bytes in 0 blocks
==12849== still reachable: 7,940,667 bytes in 139,125 blocks
==12849== suppressed: 0 bytes in 0 blocks
==12849== Rerun with --leak-check=full to see details of leaked memory
==12849==
==12849== For counts of detected and suppressed errors, rerun with: -v
==12849== Use --track-origins=yes to see where uninitialised values come
from
==12849== ERROR SUMMARY: 14 errors from 8 contexts (suppressed: 6 from 6)
Segmentation fault
}}}
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/699#comment:11>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list