Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/stand/prekern One more ASSERT, won't hurt.



details:   https://anonhg.NetBSD.org/src/rev/33a5578c6ed5
branches:  trunk
changeset: 827825:33a5578c6ed5
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Nov 13 21:33:42 2017 +0000

description:
One more ASSERT, won't hurt.

diffstat:

 sys/arch/amd64/stand/prekern/elf.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r c33c6fd1b6cc -r 33a5578c6ed5 sys/arch/amd64/stand/prekern/elf.c
--- a/sys/arch/amd64/stand/prekern/elf.c        Mon Nov 13 21:32:21 2017 +0000
+++ b/sys/arch/amd64/stand/prekern/elf.c        Mon Nov 13 21:33:42 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf.c,v 1.11 2017/11/13 21:32:21 maxv Exp $    */
+/*     $NetBSD: elf.c,v 1.12 2017/11/13 21:33:42 maxv Exp $    */
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc. All rights reserved.
@@ -295,6 +295,7 @@
                secva = mm_map_segment(segtype, secpa, secsz);
 
                /* We want (headva + sh_offset) to be the VA of the section. */
+               ASSERT(secva > headva);
                shdr->sh_offset = secva - headva;
        }
 }



Home | Main Index | Thread Index | Old Index