seiferff / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

lsdistcc segfaults when called with more than 502 hosts #148

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using the lsditscc shipped with ditscc 3.1, (also reproduced using the tip) on 
Debian 7.4.

 lsdistcc example1 example2 ... example504

causes a segfault.

Here is a specific example:

501 hosts seems to work fine:

% lsdistcc `perl -e 'print join " ", map { "example$_" } 1..501'`

502 or 503 hosts reports stack smashing:

% lsdistcc `perl -e 'print join " ", map { "example$_" } 1..502'`
*** stack smashing detected ***: lsdistcc terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f3644973917]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7f36449738e0]
lsdistcc[0x403ea7]
======= Memory map: ========
00400000-0040b000 r-xp 00000000 08:21 2897947                            
/usr/bin/lsdistcc
<SNIP>
7fff5366d000-7fff53698000 rw-p 00000000 00:00 0                          [stack]
7fff536a9000-7fff536ab000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  
[vsyscall]
Abort

504 or more causes a segfault:

% lsdistcc `perl -e 'print join " ", map { "example$_" } 1..504'`
Segmentation fault

Original issue reported on code.google.com by bcmar...@gmail.com on 19 Dec 2014 at 3:22