From: Noah Watkins Date: Wed, 30 Oct 2013 23:34:29 +0000 (-0700) Subject: prio-q: initialize cur iterator X-Git-Tag: v0.72~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4402898390a9d9c8cb296ea05ac7c75f2c32a528;p=ceph.git prio-q: initialize cur iterator For new SubQueues `cur` is not intialized, so front/pop_front will freak out. I honestly I have no idea how this hasn't been seen, but it was being triggered frequently on OSX. Fixes: #6686 Signed-off-by: Noah Watkins Reviewed-by: Samuel Just --- diff --git a/src/common/PrioritizedQueue.h b/src/common/PrioritizedQueue.h index 6dcb519da400..e663f277693e 100644 --- a/src/common/PrioritizedQueue.h +++ b/src/common/PrioritizedQueue.h @@ -92,7 +92,7 @@ class PrioritizedQueue { SubQueue() : tokens(0), max_tokens(0), - size(0) {} + size(0), cur(q.begin()) {} void set_max_tokens(unsigned mt) { max_tokens = mt; }