Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525546 - 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
Summary: sys-devel/make-4.1 without /dev/pts mounted - segmentation fault in define_va...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2014-10-16 09:02 UTC by Vlad Horko
Modified: 2014-10-20 20:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
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/
#1  0x00007ffff769a8be in strdup () from /lib64/
#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
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-10-16 17:32:23 UTC
Would you mind reporting this to upstream? 

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 <> -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.