vm_object_shadow(): Add a DIAGNOSTIC check for shadowing a null object.
From Charles Hannum <mycroft@netbsd.org>
This commit is contained in:
parent
a49641e340
commit
cbb4319fb9
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_object.c,v 1.44 1997/02/24 22:19:26 thorpej Exp $ */
|
||||
/* $NetBSD: vm_object.c,v 1.45 1997/02/25 23:28:09 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 Charles M. Hannum. All rights reserved.
|
||||
@ -896,6 +896,11 @@ vm_object_shadow(object, offset, length)
|
||||
|
||||
source = *object;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
if (source == NULL)
|
||||
panic("vm_object_shadow: attempt to shadow null object");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Allocate a new object with the given length
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user