From 4402898390a9d9c8cb296ea05ac7c75f2c32a528 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Wed, 30 Oct 2013 16:34:29 -0700 Subject: [PATCH] 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 --- src/common/PrioritizedQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.3