You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2007/11/07 07:45:54 UTC

testshm flaw (err 2 or 22)

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.  But I'd be looking for a couple
of ack's before doing that, since 1.2 right now is shaping up to be a quite
long-lived release, especially for unix.

Re: testshm flaw (err 2 or 22)

Posted by Jeff Trawick <tr...@gmail.com>.
On Nov 7, 2007 1:45 AM, William A. Rowe, Jr. <wr...@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);
}