Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 14:39:18 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Andrew Duane <aduane@juniper.net>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: -HEAD on gxemul/MALTA is broken
Message-ID:  <B8CF48BD-7A3A-4F2E-9564-734600EDAEC3@bsdimp.com>
In-Reply-To: <477C1270D3E5484DA2303CEBE274C9E1250ED2D7@CH1PRD0510MB392.namprd05.prod.outlook.com>
References:  <CAJ-VmonpK2AazaLwc1ZQWve0bTFvtLGeF4K8jWM49rzp1j%2Bk%2BQ@mail.gmail.com> <CAJ-VmomiRo0ZpTd2=qeF9M=nBGmhd3jvqUy-4FtUxx4ok2yRew@mail.gmail.com> <CAJ-VmomkomN_oGSfed5J9Tzf=4SRWrUOmU7rs7SgS24aYfTf%2BQ@mail.gmail.com> <477C1270D3E5484DA2303CEBE274C9E1250ED2D7@CH1PRD0510MB392.namprd05.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The code Adrian quoted is wrong: it needs to guard against NULL, which =
is what I just committed...

Warner
On Apr 17, 2013, at 12:13 PM, Andrew Duane wrote:

> I tripped across this doing some early Octeon work. IIRC, it has to do =
with the static kenv (kern_envp) not being initialized properly. I had =
to work around it somehow, but I'm afraid I forgot how :(
>=20
>  ....................................
> Andrew L. Duane
> Resident Architect - AT&T Technical Lead
> m   +1 603.770.7088
> o    +1 408.933.6944 (2-6944)
> skype: andrewlduane
> aduane@juniper.net
>=20
>=20
>=20
> -----Original Message-----
> From: owner-freebsd-mips@freebsd.org =
[mailto:owner-freebsd-mips@freebsd.org] On Behalf Of Adrian Chadd
> Sent: Wednesday, April 17, 2013 2:03 PM
> To: freebsd-mips@freebsd.org
> Subject: Re: -HEAD on gxemul/MALTA is broken
>=20
> On 17 April 2013 10:49, Adrian Chadd <adrian@freebsd.org> wrote:
>=20
>> gcc version 4.2.1 20070831 patched [FreeBSD] [ warning: LOW =
reference:=20
>> vaddr=3D0x00000000, exception TLBL,
>> pc=3D0x8020f024 <init_dynamic_kenv+0x3c> ] Trap cause =3D 2 (TLB miss=20=

>> (load or instr. fetch) - kernel mode) [ thread pid 0 tid 0 ]
>> Stopped at      0x8020f024:     lb      v0,0(s2)
>> db>
>=20
> (kgdb) list *0x8020f024
> 0x8020f024 is in init_dynamic_kenv
> =
(/usr/home/adrian/work/freebsd/svn/src/sys/kern/kern_environment.c:234).
> 229             int i;
> 230
> 231             kenvp =3D malloc((KENV_SIZE + 1) * sizeof(char *), =
M_KENV,
> 232                     M_WAITOK | M_ZERO);
> 233             i =3D 0;
> 234             if (*kern_envp !=3D '\0') {
> 235                     for (cp =3D kern_envp; cp !=3D NULL; cp =3D
> kernenv_next(cp)) {
> 236                             len =3D strlen(cp) + 1;
> 237                             if (len > KENV_MNAMELEN + 1 +
> KENV_MVALLEN + 1) {
> 238                                     printf(
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to =
"freebsd-mips-unsubscribe@freebsd.org"
>=20
>=20
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to =
"freebsd-mips-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B8CF48BD-7A3A-4F2E-9564-734600EDAEC3>