8b814dfefb498d8eb99e2c65a9ba66a9936c66d2 |
|
16-Apr-2015 |
Phil Carmody <phil@dovecot.fi> |
lib: test-array build warnings on Solaris 10
Solaris cc doesn't think I've read N1570 6.7.9p11, 6.5.16.1p2, and 6.3.1.3p2,
and wants to save me from myself.
Reported-by: Juergen Obermann <http://www.dovecot.org/list/dovecot/2015-April/100427.html>
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
9a6250aecfe56f0970761806c16794c04330f46a |
|
24-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
lib: array - helper to swap array buffer ownership
Currently there's no simple way to create a replacement for an array,
and then atomically switch in that replacement. With this helper,
you can just exchange ownership of the two lists and then free the
new list (which now contains the old buffer).
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
4f3374cf603147d6e3d60c9dd6e1cfe1c1926c1a |
|
01-Dec-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: test-array - really really really stop gcc optimising away fatal tests
Gcc 4.6 also was determined to optimise away the calls that should crash.
We therefore have to do *something*, no matter how stupid, with the return
values. This should do it. (please, oh please, oh please, ...)
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
173b12537fdc65f71235073193223e811a00d130 |
|
28-Nov-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: test-array - remove possibility to optimise out tests
(void) on a call to a "pure" function was causing some compilers (gcc 4.8)
to not reach the assert within the pure function. Technically it's not a
pure function, as (in the assert fail case) it has effects other than its
return value. However, simply removing the void cast (and then actually
using the return value) also prevents this optimisation.
An additional fatal test was added - there's a difference between an access
outside the allocated range and outside the initialised range.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
5d017bb2f0820b8a8d6b4e965435b78860dc9559 |
|
25-Nov-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: test-array - fix off-by-one in test_reverse
i is not used as an index, but as a count. Therefore, it can attain the
array size in the loop without causing any buffer overflows.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |