What is a "Foreword" to a blog?
[PATCH] fix apr_random
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Apache HTTP Server > [PATCH] fix apr_random 6 October 2004 09:53:03

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

[PATCH] fix apr_random

Mladen Turk 6 October 2004 09:53:03
 Hi,

This patch fixes the testrandom on WIN32.
Found by try-error-fix, knowing that
the allocated data on WIN32 is garbage, and
on unixes it might be zeroed, and that could
be the only cause why the test is passing on
my FreeBDS, but fails on WIN32.

Anyhow, all the tests passing now on WIN32,
except those with EINVAL.

Index: apr_random.c
===================­====================­====================­========
RCS file: /home/cvspublic/apr­/random/unix/apr_ran­dom.c,v
retrieving revision 1.9
diff -u -r1.9 apr_random.c
--- apr_random.c28 Feb 2004 18:31:41 -00001.9
+++ apr_random.c28 Aug 2004 14:35:06 -0000
@@ -111,8 +111,8 @@
/2)*g->pool_hash->s­ize*2;
g->reseed_size = APR_RANDOM_DEFAULT_­RESEED_SIZE;

- g->H = apr_palloc(p,H_size­(g));
- g->H_waiting = apr_palloc(p,H_size­(g));
+ g->H = apr_pcalloc(p,H_siz­e(g));
+ g->H_waiting = apr_pcalloc(p,H_siz­e(g));

g->randomness = apr_palloc(p,B_size­(g));
g->random_bytes = 0;


Regards,
MT.
Add comment
Joe Orton 6 October 2004 09:53:03 permanent link ]
 On Sat, Aug 28, 2004 at 04:43:55PM +0200, Mladen Turk wrote:> Hi,>
This patch fixes the testrandom on WIN32.> Found by try-error-fix, knowing that> the allocated data on WIN32 is garbage, and> on unixes it might be zeroed, and that could> be the only cause why the test is passing on> my FreeBDS, but fails on WIN32.

I checked this in, the tests were failing consistently on Unix when
using ElectricFence in non-zero-fill mode too. Thanks for tracking it
down.

joe

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Apache HTTP Server > [PATCH] fix apr_random 6 October 2004 09:53:03

see also:
transfer files that doesent exists
several pointers to records in one…
Reading from file on local disk to…
пройди тесты:
see also:
:-$
make love
print a page without image and…

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .