Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2009 11:55:19 +0300 (MSK)
From:      Maxim Konovalov <maxim@macomnet.ru>
To:        Garrett Cooper <yanefbsd@gmail.com>
Cc:        "amd64@freebsd.org" <amd64@freebsd.org>, Hackers freeBSD <freebsd-hackers@freebsd.org>
Subject:   Re: Confused by segfault with legitimate call to strerror(3) on amd64 / sysctl(3) setting `odd' errno's
Message-ID:  <20090116115448.A32187@mp2.macomnet.net>
In-Reply-To: <7d6fde3d0901160044x4d7735cep16f032cd99dbc835@mail.gmail.com>
References:  <7d6fde3d0901160041n55466290l55f737d274a40895@mail.gmail.com> <7d6fde3d0901160044x4d7735cep16f032cd99dbc835@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Jan 2009, 00:44-0800, Garrett Cooper wrote:

> On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper <yanefbsd@gmail.com> wrote:
> > Hi amd64 and Hackers,
> >    Uh, I'm really confused why 1) this error (errno => ENOMEM) would
> > occur when I have more than enough free memory (both on x86 and amd64)
> > and 2) why strerror would segfault in the call to errx in the attached
> > sourcefile on amd64 only. Not initializing len causes the second
> > output sample (errno => 14, which is EFAULT).
> >    Any ideas?

-	size_t len;
+	size_t len = 4;

-- 
Maxim Konovalov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090116115448.A32187>