Bug #1110

Segmentation fault in psxy -Fa if input is empty

Added by Michael 3 months ago. Updated 3 months ago.

Status:ClosedStart date:2017-06-11
Priority:LowDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:

Description

>test
gdb gmt

(gdb) run psxy -JX10c -R0/1/0/1 -O -K -Fa test
Starting program: /home/michael/tmp/gmt5/bin/gmt psxy -JX10c -R0/1/0/1 -O -K -Fa test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffd9bba700 (LWP 151228)]
[New Thread 0x7fffd8b84700 (LWP 151230)]
[Thread 0x7fffd8b84700 (LWP 151230) exited]
[Thread 0x7fffd9bba700 (LWP 151228) exited]
[New Thread 0x7fffd9bba700 (LWP 151232)]
[New Thread 0x7fffd8b84700 (LWP 151233)]
[New Thread 0x7fffd817e700 (LWP 151234)]
[New Thread 0x7fffd797d700 (LWP 151235)]
[Thread 0x7fffd8b84700 (LWP 151233) exited]
[Thread 0x7fffd797d700 (LWP 151235) exited]
[Thread 0x7fffd817e700 (LWP 151234) exited]
[Thread 0x7fffd9bba700 (LWP 151232) exited]
0 A
FQ
O0
0 0 TM

% PostScript produced by:
%@GMT: psxy -JX10c -R0/1/0/1 -O -K -Fa test
%@PROJ: xy 0.00000000 1.00000000 0.00000000 1.00000000 0.000 1.000 0.000 1.000 +xy
%%BeginObject PSL_Layer_3
0 setlinecap
0 setlinejoin
3.32551 setmiterlimit
4 W

Thread 1 "gmt" received signal SIGSEGV, Segmentation fault.
0x00007ffff77ef674 in gmt_segmentize_data (GMT=0x7ffff7e4e010, Din=0x555555797230, S=0x5555557959e0) at /home/michael/tmp/gmt5-git/src/gmt_support.c:13655
13655                           if (Din->table[0]->segment[0]->header) Tout->segment[0]->header = strdup (Din->table[0]->segment[0]->header);
(gdb) backtrace
#0  0x00007ffff77ef674 in gmt_segmentize_data (GMT=0x7ffff7e4e010, Din=0x555555797230, S=0x5555557959e0) at /home/michael/tmp/gmt5-git/src/gmt_support.c:13655
#1  0x00007ffff7ab4833 in GMT_psxy (V_API=0x5555557893d0, mode=6, args=0x7fffffffda88) at /home/michael/tmp/gmt5-git/src/psxy.c:1562
#2  0x00007ffff76f4d3f in GMT_Call_Module (V_API=0x5555557893d0, module=0x7fffffffde9e "psxy", mode=6, args=0x7fffffffda88)
    at /home/michael/tmp/gmt5-git/src/gmt_api.c:9571
#3  0x0000555555555637 in main (argc=8, argv=0x7fffffffda78) at /home/michael/tmp/gmt5-git/src/gmt.c:146@

GMT svn r18361

Associated revisions

Revision 18363
Added by Paul 3 months ago

Address issue #1110

History

#1 Updated by Paul 3 months ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

Thanks, I have added some checks in r18364 that prevents these errors in psxy and gmtconvert..

#2 Updated by Paul 3 months ago

  • Status changed from Resolved to Closed

Closed as fixed.

Also available in: Atom PDF