Confused by segfault with legitimate call to strerror(3) on amd64 / sysctl(3) setting `odd' errno's

Maxim Konovalov maxim at macomnet.ru
Fri Jan 16 00:55:22 PST 2009


On Fri, 16 Jan 2009, 00:44-0800, Garrett Cooper wrote:

> On Fri, Jan 16, 2009 at 12:41 AM, Garrett Cooper <yanefbsd at 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


More information about the freebsd-amd64 mailing list