apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick" <traw...@gmail.com>
Subject Re: testshm flaw (err 2 or 22)
Date Wed, 07 Nov 2007 11:53:10 GMT
On Nov 7, 2007 1:45 AM, William A. Rowe, Jr. <wrowe@rowe-clan.net> wrote:
> William A. Rowe, Jr. wrote:
> >
> > This flaw is significant.  Need a fast solution.  Thoughts?
>
> My personal thought is that this is not a regression, and we should just
> go ahead, tag 1.2 and resolve it later.

+1; not a regression

this simpler testcase captures the limitation:  (dunno where it
works/fails other than HP-UX)

static void test_destroy_after_remove(abts_case *tc, void *data)
{
    apr_status_t rv;
    apr_shm_t *shm, *shm2;

    apr_shm_remove(SHARED_FILENAME, p);

    rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
    APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
    if (rv != APR_SUCCESS) {
        return;
    }
    ABTS_PTR_NOTNULL(tc, shm);

    apr_shm_remove(SHARED_FILENAME, p);

    rv = apr_shm_destroy(shm);
    APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
    apr_shm_t *shm, *shm2;

    apr_shm_remove(SHARED_FILENAME, p);

    rv = apr_shm_create(&shm, SHARED_SIZE, SHARED_FILENAME, p);
    APR_ASSERT_SUCCESS(tc, "Error allocating shared memory block", rv);
    if (rv != APR_SUCCESS) {
        return;
    }
    ABTS_PTR_NOTNULL(tc, shm);

    apr_shm_remove(SHARED_FILENAME, p);

    rv = apr_shm_destroy(shm);
    APR_ASSERT_SUCCESS(tc, "Error destroying shared memory block", rv);
}

Mime
View raw message