NetBSD-Bugs archive

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

port-ia64/51297: src/sys/arch/ia64/unwind/stackframe.c; 4 * poor error checking ?



>Number:         51297
>Category:       port-ia64
>Synopsis:       src/sys/arch/ia64/unwind/stackframe.c; 4 * poor error checking ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-ia64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 30 08:40:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160630
>Organization:
>Environment:
>Description:
1.

src/sys/arch/ia64/unwind/stackframe.c:1172]: (style) Checking if unsigned variable 'iprel' is less than zero.

Source code is

   if (iprel < 0) {

but

patchunwindframe(struct unwind_frame *uwf, uint64_t iprel, uint64_t relocoffset)

Maybe there is some other test that can be applied to iprel to sanity check it.

2.

src/sys/arch/ia64/unwind/stackframe.c:950]: (style) Checking if unsigned variable 'rdepth' is less than zero.

            if (rdepth < 0) goto out; /* Overshot Region containing procoffset. Bailout. */

but

   uint64_t rdepth = 0;        /* Offset within current region */

3.

src/sys/arch/ia64/unwind/stackframe.c:961]: (style) Checking if unsigned variable 'rdepth' is less than zero.

4.

src/sys/arch/ia64/unwind/stackframe.c:972]: (style) Checking if unsigned variable 'rdepth' is less than zero.

Duplicates.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index