Module Name: src
Committed By: dholland
Date: Sun Jul 31 19:12:41 UTC 2016
Modified Files:
src/sys/arch/ia64/unwind: stackframe.c
Log Message:
Instead of testing for unsigned < 0, compare before subtracting.
Reset of PR 51297 from David Binderman.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ia64/unwind/stackframe.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/ia64/unwind/stackframe.c
diff -u src/sys/arch/ia64/unwind/stackframe.c:1.6 src/sys/arch/ia64/unwind/stackframe.c:1.7
--- src/sys/arch/ia64/unwind/stackframe.c:1.6 Sun Jul 31 19:10:54 2016
+++ src/sys/arch/ia64/unwind/stackframe.c Sun Jul 31 19:12:41 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: stackframe.c,v 1.6 2016/07/31 19:10:54 dholland Exp $ */
+/* $NetBSD: stackframe.c,v 1.7 2016/07/31 19:12:41 dholland Exp $ */
/* Contributed to the NetBSD foundation by Cherry G. Mathew <[email protected]>
* This file contains routines to use decoded unwind descriptor entries
@@ -946,8 +946,8 @@ struct staterecord *buildrecordstack(str
switch (rchain[i].type) {
case R1:
rlen = rchain[i].udesc.R1.rlen;
+ if (procoffset < roffset) goto out; /* Overshot Region containing procoffset. Bailout. */
rdepth = procoffset - roffset;
- if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */
roffset += rlen;
rtype = rchain[i].udesc.R1.r;
if (!rtype) {
@@ -957,8 +957,8 @@ struct staterecord *buildrecordstack(str
case R3:
rlen = rchain[i].udesc.R3.rlen;
+ if (procoffset < roffset) goto out; /* Overshot Region containing procoffset. Bailout. */
rdepth = procoffset - roffset;
- if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */
roffset += rlen;
rtype = rchain[i].udesc.R3.r;
if (!rtype) {
@@ -968,8 +968,8 @@ struct staterecord *buildrecordstack(str
case R2:
rlen = rchain[i].udesc.R2.rlen;
+ if (procoffset < roffset) goto out; /* Overshot Region containing procoffset. Bailout. */
rdepth = procoffset - roffset;
- if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */
roffset += rlen;
rtype = false; /* prologue region */
pushrecord(¤t_state);