[XNU792.1.5] udp_lock x86 bug?
[XNU792.1.5] udp_lock x86 bug?
- Subject: [XNU792.1.5] udp_lock x86 bug?
- From: Stephane Sudre <email@hidden>
- Date: Fri, 24 Jun 2005 13:35:55 +0200
Is there not a bug in udp_lock when it comes to x86 architecture:
int
udp_lock(so, refcount, debug)
struct socket *so;
int refcount, debug;
{
int lr_saved;
#ifdef __ppc__
if (debug == 0) {
__asm__ volatile("mflr %0" : "=r" (lr_saved));
}
else lr_saved = debug;
#endif
if (so->so_pcb) {
lck_mtx_assert(((struct inpcb *)so->so_pcb)->inpcb_mtx,
LCK_MTX_ASSERT_NOTOWNED);
lck_mtx_lock(((struct inpcb *)so->so_pcb)->inpcb_mtx);
}
else {
panic("udp_lock: so=%x NO PCB! lr=%x\n", so, lr_saved);
lck_mtx_assert(so->so_proto->pr_domain->dom_mtx,
LCK_MTX_ASSERT_NOTOWNED);
lck_mtx_lock(so->so_proto->pr_domain->dom_mtx);
}
if (refcount)
so->so_usecount++;
so->reserved3= lr_saved;
return (0);
}
lr_saved is not initialized as far as I can see if __ppc__ is not
defined.
There's no warning in gcc when building on a x86?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden