Re: grdmath problems

Branden Christensen <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <CAK3C9dXfDbfRGAAzeae5Z92vj8NAVQ1mc5Y+h7uuCWq=vBNjqA@mail.gmail.com>
Joachim:


I followed your advice:
cd /usr/src/gmt-4.5.11
export CFLAGS="-g -O0"
sudo ./configure --enable-debug
sudo make

then I ran these again and still got the buffer overflow error:

/usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = 1.grd
/usr/src/gmt-4.5.11/bin/grdmath -R0/10/0/10 -I1 X = 2.grd
/usr/src/gmt-4.5.11/bin/grdmath 1.grd DUP DUP 10 LE 0.65 MUL EXCH DUP DUP
DUP 10 GT EXCH 20 LE MUL EXCH 10 SUB 10 DIV -0.05 MUL 0.65 ADD MUL EXCH DUP
DUP DUP 20 GT EXCH 30 LE MUL EXCH 20 SUB 10 DIV -0.07 MUL 0.60 ADD MUL EXCH
DUP DUP DUP 30 GT EXCH 40 LE MUL EXCH 30 SUB 10 DIV -0.08 MUL 0.53 ADD MUL
EXCH 40 GT 0.45 MUL ADD ADD ADD ADD 686 2.grd DIV EXCH POW MUL = 3.grd

The backtrace looks similar to before:

osop@osop-displays2:~$ /usr/src/gmt-4.5.11/bin/grdmath 1.grd DUP DUP 10 LE
0.65 MUL EXCH DUP DUP DUP 10 GT EXCH 20 LE MUL EXCH 10 SUB 10 DIV -0.05 MUL
0.65 ADD MUL EXCH DUP DUP DUP 20 GT EXCH 30 LE MUL EXCH 20 SUB 10 DIV -0.07
MUL 0.60 ADD MUL EXCH DUP DUP DUP 30 GT EXCH 40 LE MUL EXCH 30 SUB 10 DIV
-0.08 MUL 0.53 ADD MUL EXCH 40 GT 0.45 MUL ADD ADD ADD ADD 686 2.grd DIV
EXCH POW MUL = 3.grd
*** buffer overflow detected ***: /usr/src/gmt-4.5.11/bin/grdmath terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f2217ae5f47]
/lib/x86_64-linux-gnu/libc.so.6(+0x109e40)[0x7f2217ae4e40]
/lib/x86_64-linux-gnu/libc.so.6(+0x108d13)[0x7f2217ae3d13]
/usr/src/gmt-4.5.11/bin/grdmath[0x41e286]
/usr/src/gmt-4.5.11/bin/grdmath[0x40cd4a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f22179fc76d]
/usr/src/gmt-4.5.11/bin/grdmath[0x40f409]
======= Memory map: ========
...
...


*Branden Christensen*
The Seismo Guys Blog: http://www.osop.com.pa/blog/the-seismo-guys/
Take a Virtual Tour: http://www.osop.com.pa/tour
Sign up for the OSOP mailing list:
http://www.osop.com.pa/about/osop-mailing-list/

To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.