From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 4 18:14:26 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE051106568F for ; Fri, 4 Sep 2009 18:14:26 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 43D6C8FC16 for ; Fri, 4 Sep 2009 18:14:25 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-066-055-212.pools.arcor-ip.net [88.66.55.212]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1MjdIk0dRd-000Gz5; Fri, 04 Sep 2009 20:14:22 +0200 Received: (qmail 16885 invoked from network); 4 Sep 2009 18:14:21 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.200) by laiers.local with SMTP; 4 Sep 2009 18:14:21 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Fri, 4 Sep 2009 20:14:20 +0200 User-Agent: KMail/1.12.0 (Linux/2.6.30-ARCH; KDE/4.3.0; x86_64; ; ) References: <4AA14437.4050507@FreeBSD.org> <20090904172511.GI21946@elvis.mu.org> <4AA151C9.1090301@FreeBSD.org> In-Reply-To: <4AA151C9.1090301@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200909042014.21290.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19gvuNPkl3Xx4Of8GSFOybWI4F+mUWmcbxZZOY x5/guP1s6P8xyFHQw1YGZDbAwmI92u2M+KlLX7WTEko2NcHz0V dQuqjpS0DTsvyyC0FPb2g== Subject: Re: memchr() strangeness X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 18:14:26 -0000 On Friday 04 September 2009 19:43:37 Gabor Kovesdan wrote: > Alfred Perlstein escribi=F3: > > Moved to -hackers. > > Thanks, this was my original intention. > > > Gabor, can you please make a smaller program to exhibit this behavior? > > (not just the error line) > > > > I will be glad to help out. > > After reading your mail, I've made a small program: > > #include > #include > #include > #include > > int > main(int argc, char *argv[]) > { > bool foo; > > foo =3D memchr(argv[1], '\0', strlen(argv[1])); > if (foo) > fprintf(stderr, "Ooooops!\n"); > > } > > And it works correctly, so actually grep fails somewhere else but it's > very strange why it behaves differently jailed (or chrooted). Once > submitted it for a portbuild test because it had been working correctly > for me on a production system and then it failed on the cluster because > the package build run jailed. And then I created a jail and in fact I > could reproduce this but only in the jail. LC_* set to a locale not available in the jail? Just a wild guess. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News