Bug#858647: make: SIGSEGVs on long parameter

2017-05-08 Thread James Cowgill
Control: tags -1 patch fixed-upstream

Hi,

On 08/05/17 20:09, Bernhard Übelacker wrote:
> Hello,
> not being the maintainer I tried to reproduce this issue.
> 
> 
> # apt-get install make-dbgsym
> # gdb -q /usr/bin/make --core /coredumps/core.make.8389
> Reading symbols from /usr/bin/make...Reading symbols from 
> /usr/lib/debug/.build-id/da/27c611d20ad6bc84f6309acb961492a00c114f.debug...done.
> done.
> [New LWP 8389]
> Core was generated by `make 
> 000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terr'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x55c4e461a021 in add_string (len=9362, 
> str=0x7fff1ad1fdb4 
> "000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...)
>  at ../../strcache.c:119
> 119   sp->next = fullcache;
> 
> 
> (gdb) bt
> #0  0x55c4e461a021 in add_string (len=9362, str=0x7fff1ad1fdb4 
> "000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...)
>  at ../../strcache.c:119
> #1  add_hash (str=0x7fff1ad1fdb4 
> "000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...,
>  len=) at ../../strcache.c:164
> #2  0x55c4e460e8bc in expand_command_line_file (name=) at 
> ../../main.c:680
> #3  0x55c4e460e9e5 in handle_non_switch_argument (arg=0x7fff1ad1fdb4 
> "000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...,
>  env=0) at ../../main.c:2664
> #4  0x55c4e460eefb in decode_switches (argc=2, argv=0x7fff1ad1dbb8, 
> env=0) at ../../main.c:2768
> #5  0x55c4e45fd40a in main (argc=, argv=, 
> envp=0x7fff1ad1dbd0) at ../../main.c:1398
> 
> (gdb) print sp
> $1 = (struct strcache *) 0x0
> 
> 
> It seems that it got reported upstream in bug reports [1] and [3].
> And solved with at least commits [2] and [4].
> A package built with both patches applied does not crash with this
> command line anymore.
> Both patches would already be included in upstream release 4.2.
> 
> (Bug [5] and commit [6] seem to touch the same area.)

Thanks for investigating this - I've added some tags. Unfortunately I
think it's too late to fix this for stretch now. It should get fixed at
some point after the release though.

James



signature.asc
Description: OpenPGP digital signature


Bug#858647: make: SIGSEGVs on long parameter

2017-05-08 Thread Bernhard Übelacker
Hello,
not being the maintainer I tried to reproduce this issue.


# apt-get install make-dbgsym
# gdb -q /usr/bin/make --core /coredumps/core.make.8389
Reading symbols from /usr/bin/make...Reading symbols from 
/usr/lib/debug/.build-id/da/27c611d20ad6bc84f6309acb961492a00c114f.debug...done.
done.
[New LWP 8389]
Core was generated by `make 
000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terr'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x55c4e461a021 in add_string (len=9362, 
str=0x7fff1ad1fdb4 
"000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...)
 at ../../strcache.c:119
119   sp->next = fullcache;


(gdb) bt
#0  0x55c4e461a021 in add_string (len=9362, str=0x7fff1ad1fdb4 
"000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...)
 at ../../strcache.c:119
#1  add_hash (str=0x7fff1ad1fdb4 
"000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...,
 len=) at ../../strcache.c:164
#2  0x55c4e460e8bc in expand_command_line_file (name=) at 
../../main.c:680
#3  0x55c4e460e9e5 in handle_non_switch_argument (arg=0x7fff1ad1fdb4 
"000x015-terrain.tif000x015-slopeshade.tif000x015-hillshade.tif000x016-terrain.tif000x016-slopeshade.tif000x016-hillshade.tif001x015-terrain.tif001x015-slopeshade.tif001x015-hillshade.tif001x016-terrai"...,
 env=0) at ../../main.c:2664
#4  0x55c4e460eefb in decode_switches (argc=2, argv=0x7fff1ad1dbb8, env=0) 
at ../../main.c:2768
#5  0x55c4e45fd40a in main (argc=, argv=, 
envp=0x7fff1ad1dbd0) at ../../main.c:1398

(gdb) print sp
$1 = (struct strcache *) 0x0


It seems that it got reported upstream in bug reports [1] and [3].
And solved with at least commits [2] and [4].
A package built with both patches applied does not crash with this
command line anymore.
Both patches would already be included in upstream release 4.2.

(Bug [5] and commit [6] seem to touch the same area.)


Kind regards,
Bernhard


[1] http://savannah.gnu.org/bugs/?45275
[2] 
http://git.savannah.gnu.org/cgit/make.git/commit/strcache.c?id=ac9a39dad7f79bf5a599654337d12f771e246949
"strcache.c: [SV 45275] Handle very long strings."
[3] http://savannah.gnu.org/bugs/?47071
[4] 
http://git.savannah.gnu.org/cgit/make.git/commit/strcache.c?id=8530d77c68cf772cd5d3455574c7973232df846c
"strcache.c (add_string): [SV 47071] Handle huge initial string."
[5] http://savannah.gnu.org/bugs/?46832
[6] 
http://git.savannah.gnu.org/cgit/make.git/commit/strcache.c?id=e2b39edc22f527de3bbbea30dd756cb1f1f876cf
"strcache.c (add_hugestring): [SV 46832] Support huge strings."



Bug#858647: make: SIGSEGVs on long parameter

2017-03-24 Thread Marcos Dione
Package: make
Version: 4.1-9.1
Severity: normal

Dear Maintainer,

   * What led up to the situation?

run:

make