From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <335ad4871879ca38a650196a26e6f200@gmx.de> Date: Sat, 1 Aug 2009 16:09:30 -0700 Message-ID: Subject: Re: [9fans] Kernel crash bug From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 350de6d0-ead5-11e9-9d60-3106f5b1d025 validname0 looks like it is trying to be too clever. A better version of the first if statement would be: if((ulong)name < KZERO) { validaddr((ulong)name, 1, 0); if(!dup) print("warning: validname called from %lux with user pointer", pc); ename = vmemchr(name, 0, 1<<16); } else ename = memchr(name, 0, 1<<16); Russ