Coverity-updates archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
New Defects reported by Coverity Scan for NetBSD-i386-kernel
- To: undisclosed-recipients:;
- Subject: New Defects reported by Coverity Scan for NetBSD-i386-kernel
- From: scan-admin%coverity.com@localhost
- Date: Tue, 18 Feb 2014 14:03:15 -0800
Hi,
Please find the latest report on new defect(s) introduced to NetBSD-i386-kernel
found with Coverity Scan.
Defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1018042: Division or modulo by zero (DIVIDE_BY_ZERO)
/sys/external/bsd/compiler_rt/dist/lib/udivmoddi4.c: 67 in __udivmoddi4()
/sys/external/bsd/compiler_rt/dist/lib/udivmoddi4.c: 66 in __udivmoddi4()
** CID 1175795: Unused pointer value (UNUSED_VALUE)
/sys/arch/i386/i386/machdep.c: 1666 in cpu_setmcontext()
________________________________________________________________________________________________________
*** CID 1018042: Division or modulo by zero (DIVIDE_BY_ZERO)
/sys/external/bsd/compiler_rt/dist/lib/udivmoddi4.c: 67 in __udivmoddi4()
61 /* K X
62 * ---
63 * 0 0
64 */
65 if (rem)
66 *rem = n.s.high % d.s.low;
>>> CID 1018042: Division or modulo by zero (DIVIDE_BY_ZERO)
>>> In expression "n.s.high / d.s.low", division by expression "d.s.low"
>>> which may be zero has undefined behavior.
67 return n.s.high / d.s.low;
68 }
69 /* d.s.high != 0 */
70 if (n.s.low == 0)
71 {
72 /* K 0
/sys/external/bsd/compiler_rt/dist/lib/udivmoddi4.c: 66 in __udivmoddi4()
60 {
61 /* K X
62 * ---
63 * 0 0
64 */
65 if (rem)
>>> CID 1018042: Division or modulo by zero (DIVIDE_BY_ZERO)
>>> In expression "n.s.high % d.s.low" modulo by expression "d.s.low" which
>>> may be zero has undefined behavior.
66 *rem = n.s.high % d.s.low;
67 return n.s.high / d.s.low;
68 }
69 /* d.s.high != 0 */
70 if (n.s.low == 0)
71 {
________________________________________________________________________________________________________
*** CID 1175795: Unused pointer value (UNUSED_VALUE)
/sys/arch/i386/i386/machdep.c: 1666 in cpu_setmcontext()
1660
1661 int
1662 cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int
flags)
1663 {
1664 struct trapframe *tf = l->l_md.md_regs;
1665 const __greg_t *gr = mcp->__gregs;
>>> CID 1175795: Unused pointer value (UNUSED_VALUE)
>>> Pointer "pcb" returned by "lwp_getpcb(l)" is never used.
1666 struct pcb *pcb = lwp_getpcb(l);
1667 struct proc *p = l->l_proc;
1668 int error;
1669
1670 /* Restore register context, if any. */
1671 if ((flags & _UC_CPU) != 0) {
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit,
http://scan.coverity.com/projects/1450?tab=Overview
To unsubscribe from the email notification for new defects,
http://scan5.coverity.com/cgi-bin/unsubscribe.py
Home |
Main Index |
Thread Index |
Old Index