View Single Post
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#2086
Here is relevant PA code which starting crash log:

Code:
int pa_mainloop_poll(pa_mainloop *m) {
    pa_assert(m);
    pa_assert(m->state == STATE_PREPARED);

    if (m->quit)
        goto quit;

    m->state = STATE_POLLING;

    if (m->n_enabled_defer_events )
        m->poll_func_ret = 0;
    else {
        pa_assert(!m->rebuild_pollfds);

        if (m->poll_func)
            m->poll_func_ret = m->poll_func(m->pollfds, m->n_pollfds, m->prepared_timeout, m->poll_func_userdata);
        else
            m->poll_func_ret = poll(m->pollfds, m->n_pollfds, m->prepared_timeout);

        if (m->poll_func_ret < 0) {
            if (errno == EINTR)
                m->poll_func_ret = 0;
            else
                pa_log("poll(): %s", pa_cstrerror(errno));
        }
    }

    m->state = m->poll_func_ret < 0 ? STATE_PASSIVE : STATE_POLLED;
    return m->poll_func_ret;

quit:
    m->state = STATE_QUIT;
    return -2;
}
It looks like PA could have some poll() wrapper (no idea if maemo using it or not).

String Bad address is written when poll() returns EFAULT.

poll() manpage:
Code:
EFAULT The array given as argument was not contained in the calling program's address space.
So this looks like as there is memory corruption in PA.

Any idea how it is possible to debug? How PA can pass invalid pointer?
 

The Following 2 Users Say Thank You to pali For This Useful Post: