Gentoo Archives: gentoo-embedded

From: Natanael Copa <mlists@××××××.org>
To: gentoo-embedded@l.g.o
Subject: [gentoo-embedded] vim and less segfaulting
Date: Thu, 02 Jun 2005 09:52:35
Message-Id: 429ED6E7.8030404@tanael.org
1 Looks like my uclibc hardened environment is broken.
2
3 I had built a bunch of packages. I deinstalled them (around 9th May). I
4 did an "emerge sync" a few days ago and then installed all the pacakges
5 with "emerge -Duk" so that the already compiled packages were just
6 reinstalled. The packages were installed sucessfully.
7
8 But now vim and less have started to segfault:
9
10 nc alpine # less
11 Segmentation fault
12
13 With strace:
14 ...
15 read(3, "\32\0010\0&\0\17\0\235\1&\5", 12) = 12
16 read(3, "xterm|xterm terminal emulator (X"..., 48) = 48
17 read(3, "\0\1\0\0\1\0\0\0\1\0\0\0\0\1\1\0\0\0\0\0\0\0\1\0\0\1\0"..., 38)
18 = 38
19 read(3, "P\0\10\0\30\0\377\377\377\377\377\377\377\377\377\377\377"...,
20 30) = 30read(3,
21 "\0\0\4\0\6\0\10\0\31\0\36\0&\0*\0.\0\377\3779\0J\0L\0P"..., 826) = 826
22 read(3, "\33[Z\0\7\0\r\0\33[%i%p1%d;%p2%dr\0\33[3g\0\33["..., 1318) = 1318
23 read(3, "\1\0\0\0\1\0\3\0\6\0", 10) = 10
24 read(3, "\1", 1) = 1
25 read(3, "\0", 1) = 1
26 read(3, "\377\377\0\0\3\0", 6) = 6
27 read(3, "AX\0XM\0", 6) = 6
28 close(3) = 0
29 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
30 +++ killed by SIGSEGV +++
31
32 I can recompile ncurses, vim, less, vim-core but it still segfaults.
33
34 So I tried to recompile uclibc. It does compile but it fails on testing
35 vfork:
36 -------
37
38 Compiling vs uClibc:
39
40 gcc -Wall -Wstrict-prototypes -O0 -g -c vfork.c -o vfork.o
41 gcc -g -Wl,-warn-common vfork.o -o vfork
42 true -Since_we_are_debugging -x -R .note -R .comment vfork
43 ./vfork
44 Hi. I'm the child process...
45 Hello. I'm the parent process.
46 make[1]: *** [vfork] Killed
47 make[1]: *** Deleting file `vfork'
48 make[1]: Leaving directory
49 `/var/tmp/portage/uclibc-0.9.27/work/uClibc-0.9.27/test/unistd'
50 make: *** [_dir_unistd] Error 2
51
52 Also gcc fails to compile.
53
54 /work/build/gcc/xgcc
55 -B/var/tmp/portage/gcc-3.4.3.20050110-r2/work/build/gcc/
56 -B/usr/i386-pc-linux-uclibc/bin/ -B/usr/i386-pc-linux-uclibc/lib/
57 -isystem /usr/i386-pc-linux-uclibc/include -isystem
58 /usr/i386-pc-linux-uclibc/sys-include -E
59 checking for egrep... grep -E
60 checking for ANSI C header files... yes
61 checking for sys/types.h... yes
62 checking for sys/stat.h... yes
63 checking for stdlib.h... yes
64 checking for string.h... yes
65 checking for memory.h... yes
66 checking for strings.h... yes
67 checking for inttypes.h... yes
68 checking for stdint.h... yes
69 checking for unistd.h... yes
70 checking for C locale to use... configure: error: Unknown argument to
71 enable/disable clocale
72 make[1]: *** [configure-target-libstdc++-v3] Error 1
73 make[1]: Leaving directory
74 `/var/tmp/portage/gcc-3.4.3.20050110-r2/work/build'
75 make: *** [profiledbootstrap] Error 2
76
77
78 This is the emerge info:
79
80 Gentoo Base System version 1.6.12
81 Portage 2.0.51.22-r1 (uclibc/x86/hardened, gcc-3.4.3-20050110,
82 uclibc-0.9.27-r0, 2.6.11-gentoo-r9 i686)
83 =================================================================
84 System uname: 2.6.11-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
85 distcc 2.18.3 i386-pc-linux-uclibc (protocols 1 and 2) (default port
86 3632) [disabled]
87 ccache version 2.4 [disabled]
88 dev-lang/python: 2.3.5
89 sys-apps/sandbox: 1.2.8
90 sys-devel/autoconf: 2.13, 2.59-r6
91 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
92 sys-devel/binutils: 2.16-r1
93 sys-devel/libtool: 1.5.18
94 virtual/os-headers: 2.6.11-r1
95 ACCEPT_KEYWORDS="x86 ~x86"
96 AUTOCLEAN="yes"
97 CBUILD="i386-pc-linux-uclibc"
98 CFLAGS="-march=i386 -Os -pipe"
99 CHOST="i386-pc-linux-uclibc"
100 CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
101 /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
102 CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
103 CXXFLAGS="-Os -pipe"
104 DISTDIR="/var/cache/distfiles"
105 FEATURES="autoconfig buildpkg distlocks nodoc noinfo noman sandbox
106 sfperms strict"
107 GENTOO_MIRRORS="http://mirror.nor.example.com/alpine
108 ftp://mirror.pudas.net/gentoo ftp://ftp.uninett.no/pub/Linux/Gentoo
109 http://gentoo.oregonstate.edu
110 http://www.ibiblio.org/pub/Linux/distributions/gentoo"
111 PKGDIR="/var/cache/packages"
112 PORTAGE_TMPDIR="/var/tmp"
113 PORTDIR="/usr/portage"
114 PORTDIR_OVERLAY="/usr/local/portage /usr/src/alpine/pkgs/portage"
115 SYNC="rsync://proxy.nor.example.com/gentoo-portage"
116 USE="x86 X509 berkdb cdr curl gd gdbm hardened jpeg ncurses ogg opengl
117 pcmcia perl pic png python readline ssl uclibc vorbis zlib userland_GNU
118 kernel_linux elibc_uclibc"
119 Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
120
121 Any ideas?
122 --
123 gentoo-embedded@g.o mailing list

Replies

Subject Author
Re: [gentoo-embedded] vim and less segfaulting Mike Frysinger <vapier@g.o>
Re: [gentoo-embedded] vim and less segfaulting "Peter S. Mazinger" <ps.m@×××.net>