Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2235 closed defect (fixed)

r.param.scale crashes during compile for revision 59387 on Ubuntu 12.0.4 x64

Reported by: dnewcomb Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Raster Version: svn-trunk
Keywords: r.param.scale Cc:
CPU: x86-64 Platform: Linux

Description (last modified by hamish)

error in r.param.scale popped up while compiling revision:

59387.Errors in:

/usr/local/grass-7.0.svn/grass7_trunk/raster/r.param.scale

cd to /usr/local/grass-7.0.svn/grass7_trunk/raster/r.param.scale amd make shows the following:

make
if [ "/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale" != "" ] ; then GISRC=/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc70 GISBASE=/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu PATH="/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin:/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin:/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/scripts:$PATH" PYTHONPATH="/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/etc/python:/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/etc/python:$PYTHONPATH" LD_LIBRARY_PATH="/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin:/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib:/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib:" LC_ALL=C /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale --html-description < /dev/null | grep -v '</body>\|</html>' > r.param.scale.tmp.html ; fi
*** buffer overflow detected ***: /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x2b92f3022f47]
/lib/x86_64-linux-gnu/libc.so.6(+0x109e40)[0x2b92f3021e40]
/lib/x86_64-linux-gnu/libc.so.6(+0x1092a9)[0x2b92f30212a9]
/lib/x86_64-linux-gnu/libc.so.6(_IO_default_xsputn+0xdd)[0x2b92f2f9413d]
/lib/x86_64-linux-gnu/libc.so.6(_IO_vfprintf+0x3123)[0x2b92f2f63ae3]
/lib/x86_64-linux-gnu/libc.so.6(__vsprintf_chk+0x94)[0x2b92f3021344]
/lib/x86_64-linux-gnu/libc.so.6(__sprintf_chk+0x7d)[0x2b92f302128d]
/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale(interface+0x136)[0x403716]
/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale(main+0x9)[0x402379]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x2b92f2f3976d]
/usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale[0x4023e9]
======= Memory map: ========
00400000-00407000 r-xp 00000000 08:01 2880678                            /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale
00606000-00607000 r--p 00006000 08:01 2880678                            /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale
00607000-00608000 rw-p 00007000 08:01 2880678                            /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/bin/r.param.scale
00773000-00794000 rw-p 00000000 00:00 0                                  [heap]
2b92f2330000-2b92f2352000 r-xp 00000000 08:01 2002200                    /lib/x86_64-linux-gnu/ld-2.15.so
2b92f2352000-2b92f2354000 rw-p 00000000 00:00 0 
2b92f2552000-2b92f2553000 r--p 00022000 08:01 2002200                    /lib/x86_64-linux-gnu/ld-2.15.so
2b92f2553000-2b92f2555000 rw-p 00023000 08:01 2002200                    /lib/x86_64-linux-gnu/ld-2.15.so
2b92f2558000-2b92f2567000 r-xp 00000000 08:01 2865459                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.7.0.svn.so
2b92f2567000-2b92f2766000 ---p 0000f000 08:01 2865459                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.7.0.svn.so
2b92f2766000-2b92f2767000 r--p 0000e000 08:01 2865459                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.7.0.svn.so
2b92f2767000-2b92f2768000 rw-p 0000f000 08:01 2865459                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gmath.7.0.svn.so
2b92f2768000-2b92f2769000 rw-p 00000000 00:00 0 
2b92f2770000-2b92f2797000 r-xp 00000000 08:01 2863145                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so
2b92f2797000-2b92f2996000 ---p 00027000 08:01 2863145                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so
2b92f2996000-2b92f2997000 r--p 00026000 08:01 2863145                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so
2b92f2997000-2b92f2998000 rw-p 00027000 08:01 2863145                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_raster.7.0.svn.so
2b92f2998000-2b92f2999000 rw-p 00000000 00:00 0 
2b92f29a0000-2b92f29d6000 r-xp 00000000 08:01 2861276                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.7.0.svn.so
2b92f29d6000-2b92f2bd5000 ---p 00036000 08:01 2861276                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.7.0.svn.so
2b92f2bd5000-2b92f2bd6000 r--p 00035000 08:01 2861276                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.7.0.svn.so
2b92f2bd6000-2b92f2bd7000 rw-p 00036000 08:01 2861276                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_gis.7.0.svn.so
2b92f2bd7000-2b92f2bd9000 rw-p 00000000 00:00 0 
2b92f2c18000-2b92f2d13000 r-xp 00000000 08:01 2002199                    /lib/x86_64-linux-gnu/libm-2.15.so
2b92f2d13000-2b92f2f12000 ---p 000fb000 08:01 2002199                    /lib/x86_64-linux-gnu/libm-2.15.so
2b92f2f12000-2b92f2f13000 r--p 000fa000 08:01 2002199                    /lib/x86_64-linux-gnu/libm-2.15.so
2b92f2f13000-2b92f2f14000 rw-p 000fb000 08:01 2002199                    /lib/x86_64-linux-gnu/libm-2.15.so
2b92f2f14000-2b92f2f15000 rw-p 00000000 00:00 0 
2b92f2f18000-2b92f30cd000 r-xp 00000000 08:01 1976770                    /lib/x86_64-linux-gnu/libc-2.15.so
2b92f30cd000-2b92f32cd000 ---p 001b5000 08:01 1976770                    /lib/x86_64-linux-gnu/libc-2.15.so
2b92f32cd000-2b92f32d1000 r--p 001b5000 08:01 1976770                    /lib/x86_64-linux-gnu/libc-2.15.so
2b92f32d1000-2b92f32d3000 rw-p 001b9000 08:01 1976770                    /lib/x86_64-linux-gnu/libc-2.15.so
2b92f32d3000-2b92f32d8000 rw-p 00000000 00:00 0 
2b92f32d8000-2b92f3446000 r-xp 00000000 08:01 2230787                    /usr/lib/libfftw3.so.3.3.0
2b92f3446000-2b92f3645000 ---p 0016e000 08:01 2230787                    /usr/lib/libfftw3.so.3.3.0
2b92f3645000-2b92f3651000 r--p 0016d000 08:01 2230787                    /usr/lib/libfftw3.so.3.3.0
2b92f3651000-2b92f3652000 rw-p 00179000 08:01 2230787                    /usr/lib/libfftw3.so.3.3.0
2b92f3658000-2b92f3f63000 r-xp 00000000 08:01 2367606                    /usr/lib/atlas-base/atlas/liblapack.so.3gf.0
2b92f3f63000-2b92f4163000 ---p 0090b000 08:01 2367606                    /usr/lib/atlas-base/atlas/liblapack.so.3gf.0
2b92f4163000-2b92f4168000 rw-p 0090b000 08:01 2367606                    /usr/lib/atlas-base/atlas/liblapack.so.3gf.0
2b92f4168000-2b92f4276000 rw-p 00000000 00:00 0 
2b92f4278000-2b92f45d8000 r-xp 00000000 08:01 2367605                    /usr/lib/atlas-base/atlas/libblas.so.3gf.0
2b92f45d8000-2b92f47d8000 ---p 00360000 08:01 2367605                    /usr/lib/atlas-base/atlas/libblas.so.3gf.0
2b92f47d8000-2b92f47e1000 rw-p 00360000 08:01 2367605                    /usr/lib/atlas-base/atlas/libblas.so.3gf.0
2b92f47e8000-2b92f47f7000 r-xp 00000000 08:01 2864739                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_ccmath.7.0.svn.so
2b92f47f7000-2b92f49f6000 ---p 0000f000 08:01 2864739                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_ccmath.7.0.svn.so
2b92f49f6000-2b92f49f7000 r--p 0000e000 08:01 2864739                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_ccmath.7.0.svn.so
2b92f49f7000-2b92f49f8000 rw-p 0000f000 08:01 2864739                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_ccmath.7.0.svn.so
2b92f49f8000-2b92f49fa000 r-xp 00000000 08:01 2002203                    /lib/x86_64-linux-gnu/libdl-2.15.so
2b92f49fa000-2b92f4bfa000 ---p 00002000 08:01 2002203                    /lib/x86_64-linux-gnu/libdl-2.15.so
2b92f4bfa000-2b92f4bfb000 r--p 00002000 08:01 2002203                    /lib/x86_64-linux-gnu/libdl-2.15.so
2b92f4bfb000-2b92f4bfc000 rw-p 00003000 08:01 2002203                    /lib/x86_64-linux-gnu/libdl-2.15.so
2b92f4bfc000-2b92f4bfd000 rw-p 00000000 00:00 0 
2b92f4c00000-2b92f4c08000 r-xp 00000000 08:01 2854784                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_datetime.7.0.svn.so
2b92f4c08000-2b92f4e07000 ---p 00008000 08:01 2854784                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_datetime.7.0.svn.so
2b92f4e07000-2b92f4e08000 r--p 00007000 08:01 2854784                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_datetime.7.0.svn.so
2b92f4e08000-2b92f4e09000 rw-p 00008000 08:01 2854784                    /usr/local/grass-7.0.svn/grass7_trunk/dist.x86_64-unknown-linux-gnu/lib/libgrass_datetime.7.0.svn.so
2b92f4e10000-2b92f4e26000 r-xp 00000000 08:01 1981929                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
2b92f4e26000-2b92f5025000 ---p 00016000 08:01 1981929                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
2b92f5025000-2b92f5026000 r--p 00015000 08:01 1981929                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
2b92f5026000-2b92f5027000 rw-p 00016000 08:01 1981929                    /lib/x86_64-linux-gnu/libz.so.1.2.3.4
2b92f5027000-2b92f5028000 rw-p 00000000 00:00 0 
2b92f5028000-2b92f513c000 r-xp 00000000 08:01 2231027                    /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
2b92f513c000-2b92f533c000 ---p 00114000 08:01 2231027                    /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
2b92f533c000-2b92f533d000 r--p 00114000 08:01 2231027                    /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
2b92f533d000-2b92f533f000 rw-p 00115000 08:01 2231027                    /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
2b92f5340000-2b92f5355000 r-xp 00000000 08:01 1981923                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b92f5355000-2b92f5554000 ---p 00015000 08:01 1981923                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b92f5554000-2b92f5555000 r--p 00014000 08:01 1981923                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b92f5555000-2b92f5556000 rw-p 00015000 08:01 1981923                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b92f5558000-2b92f5570000 r-xp 00000000 08:01 2002197                    /lib/x86_64-linux-gnu/libpthread-2.15.so
2b92f5570000-2b92f576f000 ---p 00018000 08:01 2002197                    /lib/x86_64-linux-gnu/libpthread-2.15.so
2b92f576f000-2b92f5770000 r--p 00017000 08:01 2002197                    /lib/x86_64-linux-gnu/libpthread-2.15.so
2b92f5770000-2b92f5771000 rw-p 00018000 08:01 2002197                    /lib/x86_64-linux-gnu/libpthread-2.15.so
2b92f5771000-2b92f5776000 rw-p 00000000 00:00 0 
2b92f5778000-2b92f57ad000 r-xp 00000000 08:01 2232652                    /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
2b92f57ad000-2b92f59ac000 ---p 00035000 08:01 2232652                    /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
2b92f59ac000-2b92f59ad000 r--p 00034000 08:01 2232652                    /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
2b92f59ad000-2b92f59ae000 rw-p 00035000 08:01 2232652                    /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0
2b92f59ae000-2b92f59b0000 rw-p 00000000 00:00 0 
7fff48fd8000-7fff48ff9000 rw-p 00000000 00:00 0                          [stack]
7fff49000000-7fff49001000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)
make: *** [r.param.scale.tmp.html] Error 1
rm r.param.scale.tmp.html

Change History (5)

comment:1 by hamish, 11 years ago

Description: modified (diff)

[formatting fix]

comment:2 by hamish, 11 years ago

Component: DefaultRaster
Keywords: r.param.scale added

same thing is showing up on the automated launchpad build:

https://launchpadlibrarian.net/170804136/buildlog_ubuntu-precise-amd64.grass70_7.0.0%2B0ubuntu3~develppa~2~svn-30242~ubuntu12.04.1_FAILEDTOBUILD.txt.gz

compiles ok, but then overflows during the --html-description run.

A small tweak was needed to the recent r59345, The string '3-499\0' needs room for at least 6 chars and it was only given 4. Try #59389.

Hamish

in reply to:  2 ; comment:3 by annakrat, 11 years ago

Replying to hamish:

A small tweak was needed to the recent r59345, The string '3-499\0' needs room for at least 6 chars and it was only given 4. Try #59389.

Sorry for that, I had there just 499 and I changed it later without enlarging the buffer. And it didn't crash for me.

comment:4 by annakrat, 11 years ago

Resolution: fixed
Status: newclosed

in reply to:  3 comment:5 by hamish, 11 years ago

Replying to annakrat:

And it didn't crash for me.

a guess- recent versions of Debian (and thus Ubuntu) packaging rules add hardening flags to the compiler CFLAGS. I believe one of the results of this is that it forces programs to crash instead of continuing on in a memory-corrupted state. It also adds a number of warnings to the compile log when it suspects something bad could happen.

see https://wiki.debian.org/Hardening

You only get those flags for a self-compile if you add them manually or if you use the package build scripts.

regards, Hamish

Note: See TracTickets for help on using tickets.