server/mpm/event/event.c:1712: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `ap_equeue_reader_next`.

server/mpm/event/event.c:1539:9: Unknown value from: apr_thread_mutex_unlock
1537.             }
1538.         }
1539.         apr_thread_mutex_unlock(g_timer_ring_mtx);
              ^
1540. 
1541.         while (num) {

server/mpm/event/event.c:1712:30: Call
1710.                 pollset_op_t *op = NULL;
1711. 
1712.                 while ((op = ap_equeue_reader_next(eq)) != NULL) {
                                   ^
1713.                     process_pollop(op);
1714.                 }

server/mpm/event/equeue.c:90:1: Parameter `eq->nelem`
  88. }
  89. 
  90. void *
      ^
  91. ap_equeue_reader_next(ap_equeue_t *eq)
  92. {

server/mpm/event/equeue.c:97:28: Call
  95.     }
  96.     else {
  97.         apr_uint32_t idx = count_to_index(eq, apr_atomic_inc32(&eq->readCount));
                                 ^
  98.         return index_to_bytes(eq, idx);
  99.     }

server/mpm/event/equeue.c:31:1: <LHS trace>
29. 
30. 
31. static APR_INLINE apr_uint32_t count_to_index(ap_equeue_t *eq, apr_uint32_t count)
    ^
32. {
33.     return (count & (eq->nelem - 1));

server/mpm/event/equeue.c:31:1: Parameter `eq->nelem`
    29. 
    30. 
    31. static APR_INLINE apr_uint32_t count_to_index(ap_equeue_t *eq, apr_uint32_t count)
        ^
    32. {
    33.     return (count & (eq->nelem - 1));

server/mpm/event/equeue.c:33:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `ap_equeue_reader_next` 
    31. static APR_INLINE apr_uint32_t count_to_index(ap_equeue_t *eq, apr_uint32_t count)
    32. {
    33.     return (count & (eq->nelem - 1));
            ^
    34. }
    35. 

static APR_INLINE apr_uint32_t count_to_index(ap_equeue_t *eq, apr_uint32_t count)
{
    return (count & (eq->nelem - 1));
}
['static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)\n{\n    timer_event_t *ep;\n    timer_event_t *te;\n    apr_status_t rc;\n    proc_info *ti = dummy;\n    int process_slot = ti->pid;\n    apr_pool_t *tpool = apr_thread_pool_get(thd);\n    void *csd = NULL;\n    apr_pool_t *ptrans;\n    ap_listen_rec *lr;\n    int have_idle_worker = 0;\n    event_conn_state_t *cs;\n    const apr_pollfd_t *out_pfd;\n    apr_int32_t num = 0;\n    apr_interval_time_t timeout_interval;\n    apr_time_t timeout_time = 0, now, last_log;\n    listener_poll_type *pt;\n    int closed = 0, listeners_disabled = 0;\n    last_log = apr_time_now();\n    free(ti);\n#define TIMEOUT_FUDGE_FACTOR 100000\n#define EVENT_FUDGE_FACTOR 10000\n    rc = init_pollset(tpool);\n    if (rc != APR_SUCCESS) {\n        ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,\n                     "failed to initialize pollset, "\n                     "attempting to shutdown process gracefully");\n        signal_threads(ST_GRACEFUL);\n        return NULL;\n    }\n    unblock_signal(LISTENER_SIGNAL);\n    apr_signal(LISTENER_SIGNAL, dummy_signal_handler);\n    for (;;) {\n        int workers_were_busy = 0;\n        if (listener_may_exit) {\n            close_listeners(process_slot, &closed);\n            if (terminate_mode == ST_UNGRACEFUL\n                || apr_atomic_read32(&connection_count) == 0)\n                break;\n        }\n        if (requests_this_child <= 0) {\n            check_infinite_requests();\n        }\n        now = apr_time_now();\n        if (APLOGtrace6(ap_server_conf)) {\n            if (now - last_log > apr_time_from_msec(1000)) {\n                last_log = now;\n                ap_log_error(APLOG_MARK, APLOG_TRACE6, 0, ap_server_conf,\n                             "connections: %d (write-completion: %d "\n                             "keep-alive: %d lingering: %d)",\n                             connection_count, write_completion_q.count,\n                             keepalive_q.count,\n                             linger_q.count + short_linger_q.count);\n            }\n        }\n        apr_thread_mutex_lock(g_timer_ring_mtx);\n        if (!APR_RING_EMPTY(&timer_ring, timer_event_t, link)) {\n            te = APR_RING_FIRST(&timer_ring);\n            if (te->when > now) {\n                timeout_interval = te->when - now;\n            }\n            else {\n                timeout_interval = 1;\n            }\n        }\n        else {\n            timeout_interval = apr_time_from_msec(100);\n        }\n        apr_thread_mutex_unlock(g_timer_ring_mtx);\n#if HAVE_SERF\n        rc = serf_context_prerun(g_serf);\n        if (rc != APR_SUCCESS) {\n        }\n#endif\n        rc = apr_pollset_poll(event_pollset, timeout_interval, &num, &out_pfd);\n        if (rc != APR_SUCCESS\n            && !APR_STATUS_IS_EINTR(rc)\n            && !APR_STATUS_IS_TIMEUP(rc)) {\n            ap_log_error(APLOG_MARK, APLOG_CRIT, rc, ap_server_conf,\n                         "apr_pollset_poll failed.  Attempting to "\n                         "shutdown process gracefully");\n            signal_threads(ST_GRACEFUL);\n        }\n        if (listener_may_exit) {\n            close_listeners(process_slot, &closed);\n            if (terminate_mode == ST_UNGRACEFUL\n                || apr_atomic_read32(&connection_count) == 0)\n                break;\n        }\n        now = apr_time_now();\n        apr_thread_mutex_lock(g_timer_ring_mtx);\n        for (ep = APR_RING_FIRST(&timer_ring);\n             ep != APR_RING_SENTINEL(&timer_ring,\n                                     timer_event_t, link);\n             ep = APR_RING_FIRST(&timer_ring))\n        {\n            if (ep->when < now + EVENT_FUDGE_FACTOR) {\n                APR_RING_REMOVE(ep, link);\n                push_timer2worker(ep);\n            }\n            else {\n                break;\n            }\n        }\n        apr_thread_mutex_unlock(g_timer_ring_mtx);\n        while (num) {\n            pt = (listener_poll_type *) out_pfd->client_data;\n            if (pt->type == PT_CSD) {\n                struct timeout_queue *remove_from_q = &write_completion_q;\n                int blocking = 1;\n                cs = (event_conn_state_t *)pt->baton;\n                switch (cs->pub.state) {\n                case CONN_STATE_CHECK_REQUEST_LINE_READABLE:\n                    cs->pub.state = CONN_STATE_READ_REQUEST_LINE;\n                    remove_from_q = &keepalive_q;\n                    blocking = 0;\n                case CONN_STATE_WRITE_COMPLETION:\n                    get_worker(&have_idle_worker, blocking,\n                               &workers_were_busy);\n                    TO_QUEUE_REMOVE(*remove_from_q, cs);\n                    rc = apr_pollset_remove(event_pollset, &cs->pfd);\n                    if (rc != APR_SUCCESS && !APR_STATUS_IS_NOTFOUND(rc)) {\n                        ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,\n                                     "pollset remove failed");\n                        start_lingering_close(cs, NULL);\n                        break;\n                    }\n                    TO_QUEUE_ELEM_INIT(cs);\n                    if (!have_idle_worker) {\n                        start_lingering_close(cs, NULL);\n                        break;\n                    }\n                    rc = push2worker(out_pfd, event_pollset);\n                    if (rc != APR_SUCCESS) {\n                        ap_log_error(APLOG_MARK, APLOG_CRIT, rc,\n                                     ap_server_conf, "push2worker failed");\n                    }\n                    else {\n                        have_idle_worker = 0;\n                    }\n                    break;\n                case CONN_STATE_LINGER_NORMAL:\n                case CONN_STATE_LINGER_SHORT:\n                    process_lingering_close(cs, out_pfd);\n                    break;\n                default:\n                    ap_log_error(APLOG_MARK, APLOG_CRIT, rc,\n                                 ap_server_conf,\n                                 "event_loop: unexpected state %d",\n                                 cs->pub.state);\n                    ap_assert(0);\n                }\n            }\n            else if (pt->type == PT_ACCEPT) {\n                int skip_accept = 0;\n                int connection_count_local = connection_count;\n                if (workers_were_busy) {\n                    skip_accept = 1;\n                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,\n                                 "All workers busy, not accepting new conns"\n                                 "in this process");\n                }\n                else if (listeners_disabled) {\n                    listeners_disabled = 0;\n                    enable_listensocks(process_slot);\n                }\n                else if (connection_count_local > threads_per_child\n                         + ap_queue_info_get_idlers(worker_queue_info) *\n                           worker_factor / WORKER_FACTOR_SCALE)\n                {\n                    skip_accept = 1;\n                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,\n                                 "Too many open connections (%u), "\n                                 "not accepting new conns in this process",\n                                 connection_count_local);\n                    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,\n                                 "Idle workers: %u",\n                                 ap_queue_info_get_idlers(worker_queue_info));\n                }\n                if (skip_accept == 0) {\n                    lr = (ap_listen_rec *) pt->baton;\n                    ap_pop_pool(&ptrans, worker_queue_info);\n                    if (ptrans == NULL) {\n                        apr_allocator_t *allocator;\n                        apr_allocator_create(&allocator);\n                        apr_allocator_max_free_set(allocator,\n                                                   ap_max_mem_free);\n                        apr_pool_create_ex(&ptrans, pconf, NULL, allocator);\n                        apr_allocator_owner_set(allocator, ptrans);\n                        if (ptrans == NULL) {\n                            ap_log_error(APLOG_MARK, APLOG_CRIT, rc,\n                                         ap_server_conf,\n                                         "Failed to create transaction pool");\n                            signal_threads(ST_GRACEFUL);\n                            return NULL;\n                        }\n                    }\n                    apr_pool_tag(ptrans, "transaction");\n                    get_worker(&have_idle_worker, 1, &workers_were_busy);\n                    rc = lr->accept_func(&csd, lr, ptrans);\n                    AP_DEBUG_ASSERT(rc == APR_SUCCESS || !csd);\n                    if (rc == APR_EGENERAL) {\n                        resource_shortage = 1;\n                        signal_threads(ST_GRACEFUL);\n                    }\n                    if (csd != NULL) {\n                        rc = ap_queue_push(worker_queue, csd, NULL, ptrans);\n                        if (rc != APR_SUCCESS) {\n                            apr_socket_close(csd);\n                            ap_log_error(APLOG_MARK, APLOG_CRIT, rc,\n                                         ap_server_conf,\n                                         "ap_queue_push failed");\n                            apr_pool_clear(ptrans);\n                            ap_push_pool(worker_queue_info, ptrans);\n                        }\n                        else {\n                            have_idle_worker = 0;\n                        }\n                    }\n                    else {\n                        apr_pool_clear(ptrans);\n                        ap_push_pool(worker_queue_info, ptrans);\n                    }\n                }\n            }\n#if HAVE_SERF\n            else if (pt->type == PT_SERF) {\n                serf_event_trigger(g_serf, pt->baton, out_pfd);\n            }\n#endif\n            out_pfd++;\n            num--;\n        }\n        {\n            int i;\n            for (i = 0; i < threads_per_child; i++) {\n                ap_equeue_t *eq = worker_equeues[i];\n                pollset_op_t *op = NULL;\n                while ((op = ap_equeue_reader_next(eq)) != NULL) {\n                    process_pollop(op);\n                }\n            }\n        }\n        now = apr_time_now();\n        if (now > timeout_time) {\n            struct process_score *ps;\n            timeout_time = now + TIMEOUT_FUDGE_FACTOR;\n            if (workers_were_busy && keepalive_q.count) {\n                ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,\n                             "All workers are busy, will close %d keep-alive "\n                             "connections",\n                             keepalive_q.count);\n                process_timeout_queue(&keepalive_q,\n                                      timeout_time + ap_server_conf->keep_alive_timeout,\n                                      start_lingering_close);\n            }\n            else {\n                process_timeout_queue(&keepalive_q, timeout_time,\n                                      start_lingering_close);\n            }\n            process_timeout_queue(&write_completion_q, timeout_time, start_lingering_close);\n            process_timeout_queue(&linger_q, timeout_time, stop_lingering_close);\n            process_timeout_queue(&short_linger_q, timeout_time, stop_lingering_close);\n            ps = ap_get_scoreboard_process(process_slot);\n            ps->write_completion = write_completion_q.count;\n            ps->lingering_close = linger_q.count + short_linger_q.count;\n            ps->keep_alive = keepalive_q.count;\n            ps->connections = apr_atomic_read32(&connection_count);\n        }\n        if (listeners_disabled && !workers_were_busy &&\n            (int)apr_atomic_read32(&connection_count) <\n            ((int)ap_queue_info_get_idlers(worker_queue_info) - 1) *\n            worker_factor / WORKER_FACTOR_SCALE + threads_per_child)\n        {\n            listeners_disabled = 0;\n            enable_listensocks(process_slot);\n        }\n    }\n    close_listeners(process_slot, &closed);\n    ap_queue_term(worker_queue);\n    apr_thread_exit(thd, APR_SUCCESS);\n    return NULL;\n}', 'void *\nap_equeue_reader_next(ap_equeue_t *eq)\n{\n    if (apr_atomic_read32(&eq->writeCount) == eq->readCount) {\n        return NULL;\n    }\n    else {\n        apr_uint32_t idx = count_to_index(eq, apr_atomic_inc32(&eq->readCount));\n        return index_to_bytes(eq, idx);\n    }\n}', 'static APR_INLINE apr_uint32_t count_to_index(ap_equeue_t *eq, apr_uint32_t count)\n{\n    return (count & (eq->nelem - 1));\n}']