You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2004/03/16 19:17:33 UTC

cvs commit: apr-util/test testrmm.c

wrowe       2004/03/16 10:17:33

  Modified:    misc     apr_rmm.c
               test     testrmm.c
  Log:
  Fix a signed/unsigned mismatch that caused an underflow.
  
  Patch by Ahab A. <eabouzou yahoo.com>
  Test by Phillip M Chiasson <gozer apache.org>
  
  PR: 25550
  
  Revision  Changes    Path
  1.23      +1 -1      apr-util/misc/apr_rmm.c
  
  Index: apr_rmm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/misc/apr_rmm.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- apr_rmm.c	13 Feb 2004 09:55:26 -0000	1.22
  +++ apr_rmm.c	16 Mar 2004 18:17:33 -0000	1.23
  @@ -87,7 +87,7 @@
           next = blk->next;
       }
   
  -    if (bestsize - size > sizeof(rmm_block_t)) {
  +    if (bestsize > sizeof(rmm_block_t) + size) {
           struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + best);
           struct rmm_block_t *new = (rmm_block_t*)((char*)rmm->base + best + size);
   
  
  
  
  1.5       +10 -2     apr-util/test/testrmm.c
  
  Index: testrmm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/test/testrmm.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- testrmm.c	13 Feb 2004 09:55:26 -0000	1.4
  +++ testrmm.c	16 Mar 2004 18:17:33 -0000	1.5
  @@ -29,7 +29,7 @@
   
   #if APR_HAS_SHARED_MEMORY
   
  -#define FRAG_SIZE 10
  +#define FRAG_SIZE 80
   #define FRAG_COUNT 10
   #define SHARED_SIZE (apr_size_t)(FRAG_SIZE * FRAG_COUNT * sizeof(char*))
   
  @@ -78,7 +78,15 @@
           off[i] = apr_rmm_malloc(rmm, fragsize);
       } 
       fprintf(stdout, "OK\n");
  -
  +    
  +    printf("Checking for out of memory allocation............");
  +    if (apr_rmm_malloc(rmm, FRAG_SIZE * FRAG_COUNT) == 0) {
  +        fprintf(stdout, "OK\n");
  +    }
  +    else {
  +        return APR_EGENERAL;  
  +    }
  +    
       printf("Setting each fragment to a unique value..........");
       for (i = 0; i < FRAG_COUNT; i++) {
           int j;
  
  
  

Re: cvs commit: apr-util/test testrmm.c

Posted by Cliff Woolley <jw...@virginia.edu>.
On Wed, 17 Mar 2004, Sander Striker wrote:

> >  1.20.2.3  +1 -1      apr-util/misc/apr_rmm.c
> >  1.3.2.2   +10 -2     apr-util/test/testrmm.c
> >
> > Sander and company - if the final tags of apr 0.9.5 / httpd 2.0.49 can
> > pick this up - it would be lovely.  Well validated.

I'll make sure they get in to 0.9.5.  I'll update the tags today.

--Cliff

Re: cvs commit: apr-util/test testrmm.c

Posted by Sander Striker <st...@apache.org>.
On Wed, 2004-03-17 at 19:36, William A. Rowe, Jr. wrote:
> At 12:07 PM 3/17/2004, Philippe M. Chiasson wrote:
> >On Tue, 2004-03-16 at 17:53 -0500, Geoffrey Young wrote:
> >> > 
> >> > Care to +1 for backport & I'll make it so today?
> >> 
> >> well, I'm not sure that my involvement in apr warrants a vote, but I'm +1 in
> >> any case :)
> >
> >Same argument from me here, this bug has forced me to use libmm in a
> >project already using APR, and I would _very_ much rather use 100%
> >APR ;-)
> 
> 
>  1.20.2.3  +1 -1      apr-util/misc/apr_rmm.c
>  1.3.2.2   +10 -2     apr-util/test/testrmm.c
> 
> Sander and company - if the final tags of apr 0.9.5 / httpd 2.0.49 can pick this
> up - it would be lovely.  Well validated.
> 
> On that subject, any chance of calling 0.9.5 toasted and then using the apr/-util
> release tag as the httpd 2.0.49 release point?

I uploaded the httpd 2.0.49 rc3 tarballs over an hour ago...

Sander

Re: cvs commit: apr-util/test testrmm.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 12:07 PM 3/17/2004, Philippe M. Chiasson wrote:
>On Tue, 2004-03-16 at 17:53 -0500, Geoffrey Young wrote:
>> > 
>> > Care to +1 for backport & I'll make it so today?
>> 
>> well, I'm not sure that my involvement in apr warrants a vote, but I'm +1 in
>> any case :)
>
>Same argument from me here, this bug has forced me to use libmm in a
>project already using APR, and I would _very_ much rather use 100%
>APR ;-)


 1.20.2.3  +1 -1      apr-util/misc/apr_rmm.c
 1.3.2.2   +10 -2     apr-util/test/testrmm.c

Sander and company - if the final tags of apr 0.9.5 / httpd 2.0.49 can pick this
up - it would be lovely.  Well validated.

On that subject, any chance of calling 0.9.5 toasted and then using the apr/-util
release tag as the httpd 2.0.49 release point?

Bill



Re: cvs commit: apr-util/test testrmm.c

Posted by "Philippe M. Chiasson" <go...@apache.org>.
On Tue, 2004-03-16 at 17:53 -0500, Geoffrey Young wrote:
> > 
> > Care to +1 for backport & I'll make it so today?
> 
> well, I'm not sure that my involvement in apr warrants a vote, but I'm +1 in
> any case :)

Same argument from me here, this bug has forced me to use libmm in a
project already using APR, and I would _very_ much rather use 100%
APR ;-)

> --Geoff
-- 
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Re: cvs commit: apr-util/test testrmm.c

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> 
> Care to +1 for backport & I'll make it so today?

well, I'm not sure that my involvement in apr warrants a vote, but I'm +1 in
any case :)

--Geoff


Re: cvs commit: apr-util/test testrmm.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 12:50 PM 3/16/2004, you wrote:

>wrowe@apache.org wrote:
>> wrowe       2004/03/16 10:17:33
>> 
>>   Modified:    misc     apr_rmm.c
>>                test     testrmm.c
>>   Log:
>>   Fix a signed/unsigned mismatch that caused an underflow.
>>   
>>   Patch by Ahab A. <eabouzou yahoo.com>
>>   Test by Phillip M Chiasson <gozer apache.org>
>
>cool.  thanks for following up :)

Care to +1 for backport & I'll make it so today?

Bill  


Re: cvs commit: apr-util/test testrmm.c

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

wrowe@apache.org wrote:
> wrowe       2004/03/16 10:17:33
> 
>   Modified:    misc     apr_rmm.c
>                test     testrmm.c
>   Log:
>   Fix a signed/unsigned mismatch that caused an underflow.
>   
>   Patch by Ahab A. <eabouzou yahoo.com>
>   Test by Phillip M Chiasson <gozer apache.org>

cool.  thanks for following up :)

--Geoff