Opened 15 years ago
Last modified 9 years ago
#970 new defect
r.report seg faults on small page width values — at Version 3
Reported by: | epatton | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 6.4.6 |
Component: | Raster | Version: | svn-develbranch6 |
Keywords: | r.report, page width, segmentation fault | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description (last modified by )
r.report seg faults when passed small values of page width values. From the NC test dataset, the elevation raster creates the seg fault on 23 characters, and an infinite loop with 24 characters:
r.report -h map=elevation pw=23 100% +---------------------+ |Category Information | | #|description | |---------------------| |104.966573-105.361675|from to � '@�?@�h0�h��h`�h@�h�����'�Yc4@/�~F�'@4@���V Al A@k#A�K#A�?�����Segmentation fault
gdb backtrace:
gdb -q r.report Reading symbols from /usr/local/grass-6.5.svn/bin/r.report...done. (gdb) run map=elevation pw=23 # lots of binary gibberish printed, then: Program received signal SIGSEGV, Segmentation fault. print_label (s=0x629000 <Address 0x629000 out of bounds>, len=<value optimized out>, pflag=1, spacing=0, dot=<value optimized out>) at label.c:46 46 putchar(*s); (gdb)
~ Eric.
Change History (3)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Milestone: | 6.5.0 → 6.4.0 |
---|
Confirmed in G6.4-7.
It only crashes with FP maps. It happens in label.c" line 44, i.e. source:grass/trunk/raster/r.report/label.c@41232#L44 (while...). "@" is never found in "from ... to" so it rounds out of bound.
Markus
comment:3 by , 13 years ago
Description: | modified (diff) |
---|---|
Milestone: | 6.4.0 → 6.4.4 |
Still segfaulting:
GRASS 6.4.3svn (nc_spm_08):~ > r.report -h map=elevation pw=23 100% +---------------------+ |Category Information | | #|description | |---------------------| |103.781266-104.176368|from to ��������c�?�?�?�?�?p� A� Segmentation fault (core dumped)
also in GRASS 7.svn:
GRASS 7.0.svn (nc_spm_08):~ > r.report -h map=elevation pw=23 100% +---------------------+ |Category Information | | #|description | |---------------------| |103.781266-104.176368|from to ��������c�?�?�?�?�?p� A� A0�#A�z#A�?�:�:G�����:n@� �:@�:`�:Segmentation fault (core dumped)
Note:
See TracTickets
for help on using tickets.
Sorry, I forget the actual backtrace. Up late watching Olympics closing ceremonies.
(gdb) bt full #0 print_label (s=0x629000 <Address 0x629000 out of bounds>, len=<value optimized out>, pflag=1, spacing=0, dot=<value optimized out>) at label.c:46
#1 0x0000000000404f81 in print_report (unit1=<value optimized out>, unit2=-1) at prt_report.c:221
#2 0x000000000040534c in report () at report.c:11
#3 0x0000000000403573 in main (argc=3, argv=0x7fffffffdae8) at main.c:73
(gdb)