Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 525546

Summary: sys-devel/make-4.1 without /dev/pts mounted - segmentation fault in define_variable_in_set (name=0x434a53 "MAKE_TERMOUT", length=12, value=0x0, ... at variable.c:243
Product: Gentoo Linux Reporter: Vlad Horko <scjthm>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vlad Horko 2014-10-16 09:02:15 UTC
Running make without arguments produces a segfault when /dev/pts isn't mounted. This makes building in a chroot jail a bit of a pain if you don't mount /dev/pts. Sometimes I don't even bother mounting /dev/ and this only happens in 4.1


at ~ # make
make: *** No targets specified and no makefile found.  Stop.
at ~ # umount /dev/pts/
at ~ # make
Segmentation fault
at ~ # 


Here is the stack trace (CFLAGS are -g -gdb)

(gdb) bt 
#0  0x00007ffff769ab7a in strlen () from /lib64/libc.so.6
#1  0x00007ffff769a8be in strdup () from /lib64/libc.so.6
#2  0x000000000041e82b in xstrdup (ptr=0x0) at misc.c:259
#3  0x000000000042c922 in define_variable_in_set (name=0x434a53 "MAKE_TERMOUT", length=12, value=0x0, 
    origin=o_default, recursive=0, set=0x440580 <global_variable_set>, flocp=0x0) at variable.c:243
#4  0x0000000000419cad in main (argc=1, argv=0x7fffffffe048, envp=0x7fffffffe058) at main.c:1404


Reproducible: Always

Steps to Reproduce:
1. unmount /dev/pts
2. run make
3.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-10-16 17:32:23 UTC
Would you mind reporting this to upstream? 

See http://savannah.gnu.org/projects/make/
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-10-20 20:28:34 UTC
+*make-4.1-r1 (20 Oct 2014)
+
+  20 Oct 2014; Lars Wendler <polynomial-c@gentoo.org> -make-4.1.ebuild,
+  +make-4.1-r1.ebuild, +files/make-4.1-fix_null_returns_from_ttyname.patch:
+  Revbump to fix a segfault when running make without /dev/pts being mounted
+  (bug #525546).
+

Thanks for reporting this here and to upstream.