Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/ia64/unwind Instead of testing for unsigned < 0, co...
details: https://anonhg.NetBSD.org/src/rev/6941659eda7c
branches: trunk
changeset: 346746:6941659eda7c
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Jul 31 19:12:41 2016 +0000
description:
Instead of testing for unsigned < 0, compare before subtracting.
Reset of PR 51297 from David Binderman.
diffstat:
sys/arch/ia64/unwind/stackframe.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (39 lines):
diff -r 634aad0a9b9d -r 6941659eda7c sys/arch/ia64/unwind/stackframe.c
--- a/sys/arch/ia64/unwind/stackframe.c Sun Jul 31 19:10:54 2016 +0000
+++ b/sys/arch/ia64/unwind/stackframe.c Sun Jul 31 19:12:41 2016 +0000
@@ -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 <cherry%mahiti.org@localhost>
* This file contains routines to use decoded unwind descriptor entries
@@ -946,8 +946,8 @@
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 @@
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index