[Varnish] #474: kqueue: bug in usage of EV_SET

Varnish varnish-bugs at projects.linpro.no
Sun Mar 22 03:43:04 CET 2009


#474: kqueue: bug in usage of EV_SET
----------------------+-----------------------------------------------------
 Reporter:  michael   |       Owner:  phk  
     Type:  defect    |      Status:  new  
 Priority:  normal    |   Milestone:       
Component:  varnishd  |     Version:  trunk
 Severity:  major     |    Keywords:       
----------------------+-----------------------------------------------------
 There’s a very subtle bug in
 http://varnish.projects.linpro.no/browser/trunk/varnish-
 cache/bin/varnishd/cache_waiter_kqueue.c#L162 (cache_waiter_kqueue.c:162
 and :163).

 You use ke[j++]. However, the definition of EV_SET (see
 /usr/include/sys/event.h) uses this argument multiple times (at least on
 NetBSD) and therefore j gets incremented multiple times. Instead, you
 should increment j separately. This fixes using kqueue on NetBSD.

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/474>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list