Re: Hash collision vectors in APR?

2012-01-27 Thread Branko Čibej
On 26.01.2012 22:59, Bojan Smojver wrote: On Fri, 2012-01-27 at 00:36 +1100, Bojan Smojver wrote: Thanks, will implement. Attached. If nobody comes up with regressions or other problems with this approach, I'll commit it to trunk. Thanks everyone for their input. The only thing that pops

Re: Hash collision vectors in APR?

2012-01-27 Thread Bojan Smojver
--- Original message --- From: Branko Čibej But the original code is already wrong in assuming that res-hash_func and overlay-hash_func are the same, so in fact you're silently fixing a bug with the current change. :) Surprisingly enough, I actually thought about this bit. Surely

pools vs thread safety

2012-01-27 Thread Botond Botyanszki
Hi, After debugging with valgrind, it looks like I have some pool related race condition in my multithreaded apr code where I have a thread-pool with multiple workers. Files and sockets are passed to the worker threads for processing. As far as I understand apr_palloc and apr_pool_destory can

Re: svn commit: r1236642 - in /apr/apr/trunk: tables/apr_hash.c test/testhash.c

2012-01-27 Thread Bojan Smojver
--- Original message --- +hash = ht-seed ^ ht-hash_func(key, klen); Actually, when I think about this, it will probably be inefective. If two keys produce the same hash, the xor-ed value against the seed will most certainly be the same as well. So, this won't actually do anything