Hi,
    I am trying to find memory errors in my application and I am having a
hard time. I tried setting APR_POOL_DEBUG=2 but it is catching the errors.

Here are the three types of errors I would like to catch.

/* according the apr docs it should about here, but it doesn't */
/* APR_POOL_DEBUG=2  */
    apr_file_printf(local_stderr, "buffer overflow for apr_pcalloc()\n");
    {
       char *buf = (char *) apr_pcalloc(local_pool, 5);
       memset(buf,0,6);
    }

    apr_file_printf(local_stderr, "buffer overflow for malloc()\n");
    {
       char *buf = (char *) malloc(5);
       memset(buf,0,6);
    }

    apr_file_printf(local_stderr, "stack overflow\n");
    {
       char buf[5];
       memset(buf,0,6);
    }

Steve

Reply via email to