Bug #995

psconvert crashes when run with invalid arguments

Added by MapMaker 8 months ago. Updated 7 months ago.

Status:ClosedStart date:2016-11-04
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.3.1 Platform:

Description

This isn't valid psconvert usage, but I thought I'd report it anyway.

$ gmt --version
5.3.1
$ gmt psconvert -A
ERROR: Caught signal number 11 (Segmentation fault) at
/lib/x86_64-linux-gnu/libc.so.6(_IO_un_link+0xa3)[0x7fbcac2bea33]
[0x8]
Stack backtrace:
/usr/local/lib/x86_64-linux-gnu/libgmt.so.5(sig_handler+0x261)[0x7fbcac6384c1]
/lib/x86_64-linux-gnu/libc.so.6(+0x36cb0)[0x7fbcac27acb0]
/lib/x86_64-linux-gnu/libc.so.6(_IO_un_link+0xa3)[0x7fbcac2bea33]
/lib/x86_64-linux-gnu/libc.so.6(fclose+0x195)[0x7fbcac2b1a65]
/usr/local/lib/x86_64-linux-gnu/libgmt.so.5(GMT_psconvert+0x2b1c)[0x7fbcac86eb7c]
/usr/local/lib/x86_64-linux-gnu/libgmt.so.5(GMT_Call_Module+0x12d)[0x7fbcac644edd]
gmt(main+0x6b1)[0x401261]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fbcac265f45]
gmt[0x40144e]

History

#1 Updated by Joaquim 8 months ago

Well, Windows is super picky with kind of stuff but it doesn't complain this time.
psconvert -A
just do nothing here

#2 Updated by MapMaker 8 months ago

Here's the Valgrind log:

==5897== Memcheck, a memory error detector
==5897== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==5897== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==5897== Command: gmt psconvert -A
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E264: fclose@@GLIBC_2.2.5 (iofclose.c:53)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 1
==5897==    at 0x56AB9D0: _IO_un_link (genops.c:60)
==5897==    by 0x569E374: fclose@@GLIBC_2.2.5 (iofclose.c:54)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E375: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x569E37C: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcce8 is 136 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x569E38C: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd58 is 248 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E3AA: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd50 is 240 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x569E3C5: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcce8 is 136 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E3CC: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid write of size 8
==5897==    at 0x569E3CE: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd58 is 248 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E3D2: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd54 is 244 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x56AA840: _IO_file_close_it@@GLIBC_2.2.5 (fileops.c:160)
==5897==    by 0x569E3EE: fclose@@GLIBC_2.2.5 (iofclose.c:58)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fccd0 is 112 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E3EF: fclose@@GLIBC_2.2.5 (iofclose.c:58)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x569E401: _IO_acquire_lock_fct (libioP.h:867)
==5897==    by 0x569E401: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcce8 is 136 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E408: _IO_acquire_lock_fct (libioP.h:867)
==5897==    by 0x569E408: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd54 is 244 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid write of size 8
==5897==    at 0x569E412: _IO_acquire_lock_fct (libioP.h:867)
==5897==    by 0x569E412: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd58 is 248 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E42A: _IO_acquire_lock_fct (libioP.h:867)
==5897==    by 0x569E42A: fclose@@GLIBC_2.2.5 (iofclose.c:56)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd50 is 240 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x569E290: fclose@@GLIBC_2.2.5 (iofclose.c:62)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd38 is 216 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x56AA9C1: _IO_file_finish@@GLIBC_2.2.5 (fileops.c:201)
==5897==    by 0x569E29E: fclose@@GLIBC_2.2.5 (iofclose.c:62)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fccd0 is 112 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x56ACC19: _IO_default_finish (genops.c:641)
==5897==    by 0x569E29E: fclose@@GLIBC_2.2.5 (iofclose.c:62)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc98 is 56 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x56ACC2B: _IO_default_finish (genops.c:647)
==5897==    by 0x569E29E: fclose@@GLIBC_2.2.5 (iofclose.c:62)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fccc0 is 96 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x56ACC48: _IO_default_finish (genops.c:650)
==5897==    by 0x569E29E: fclose@@GLIBC_2.2.5 (iofclose.c:62)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcca8 is 72 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 1
==5897==    at 0x56ACC5E: _IO_un_link (genops.c:60)
==5897==    by 0x56ACC5E: _IO_default_finish (genops.c:656)
==5897==    by 0x569E29E: fclose@@GLIBC_2.2.5 (iofclose.c:62)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 4
==5897==    at 0x569E29F: fclose@@GLIBC_2.2.5 (iofclose.c:63)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcd20 is 192 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid read of size 8
==5897==    at 0x569E450: fclose@@GLIBC_2.2.5 (iofclose.c:78)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcca8 is 72 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== Invalid free() / delete / delete[] / realloc()
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A5BE6: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Address 0x1a8fcc60 is 0 bytes inside a block of size 256 free'd
==5897==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x569E362: fclose@@GLIBC_2.2.5 (iofclose.c:84)
==5897==    by 0x50A4DDA: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897==  Block was alloc'd at
==5897==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5897==    by 0x56A0617: popen@@GLIBC_2.2.5 (iopopen.c:283)
==5897==    by 0x50A4DA7: GMT_psconvert (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x4E76D14: GMT_Call_Module (in /usr/local/lib/libgmt.so.5.3.1)
==5897==    by 0x400E1A: main (in /usr/local/bin/gmt)
==5897== 
==5897== 
==5897== HEAP SUMMARY:
==5897==     in use at exit: 72,797 bytes in 6 blocks
==5897==   total heap usage: 3,543 allocs, 3,538 frees, 3,281,804 bytes allocated
==5897== 
==5897== LEAK SUMMARY:
==5897==    definitely lost: 61 bytes in 4 blocks
==5897==    indirectly lost: 0 bytes in 0 blocks
==5897==      possibly lost: 0 bytes in 0 blocks
==5897==    still reachable: 72,736 bytes in 2 blocks
==5897==         suppressed: 0 bytes in 0 blocks
==5897== Rerun with --leak-check=full to see details of leaked memory
==5897== 
==5897== For counts of detected and suppressed errors, rerun with: -v
==5897== ERROR SUMMARY: 29 errors from 25 contexts (suppressed: 0 from 0)

#3 Updated by Paul 8 months ago

  • Status changed from New to In Progress
  • Target version set to Candidate for next bugfix release

Not clear why it would get any issues in popen. Anyway, I added a check so that if no files are given we bail earlier. Please see if r17321 helps.

#4 Updated by Joaquim 7 months ago

  • Status changed from In Progress to Resolved

#5 Updated by Joaquim 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF