bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
b0b9b292c7e3bdf0369fc04005793ace77f09f50 |
|
25-Dec-2017 |
Phil Carmody <phil@dovecot.fi> |
lib/data-stack - in panic scenarios, use the panic memory buffer
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
4c9989b49cf92d606df2667d9b472d8e0d259485 |
|
25-Dec-2017 |
Phil Carmody <phil@dovecot.fi> |
lib/datastack - remove useless thing
It was useless.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
f2969642c788b200abe5b6973f30899a07f33420 |
|
27-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Fix logging panic message if data stack canary corruption is detected
The previous code just recursed into the same canary corruption check and
didn't end up logging anything. |
47a5a7e8296f3b8f2fac9a0659d4de3f2723ba4a |
|
06-Oct-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
global: Use PRI* macros and %zu instead of casting |
cbe4d8212ec8b9014ae7ae892e90abb98a15d797 |
|
07-Jul-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
lib: remove support for Boehm GC
There were several issues with our usage of Boehm GC:
- it didn't help with memory fragmentation
- it is not very efficient
- it was rarely enabled & used
Proper use of a GC would involve radical changes to how we write code
and cause portability issues. We can get most of the benefits of a GC
with data stacks and alloc-only memory pools. |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
e7d0bea63a08b08c47c4b5c187d2cb7127859657 |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Make sure *_malloc() calculations won't cause integer overflows. |
ccfe24c9fa6bea4298dce6bc2d4cc65f05b8a538 |
|
02-Nov-2016 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
data-stack: t_push should always keep track of the marker
Instead of only keeping track of it on DEBUG builds, t_push should always
keep the marker around. This will help diagnosing issues on non-debug
builds. |
b106236913cb4888b1996f956c9c1e9eb16d67c3 |
|
05-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-test: Fixed assert-crash in test_exit() with --enable-static-checker
Fixes:
Panic: Missing t_pop() call |
e90d9eaa3ef3486c2da76b86ffd83b779f45d9cd |
|
08-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Allow static analyzers to check for t_pop() leaks.
They should be able to detect the missing free() call from code paths
missing a t_pop(). |
32c3ba3ba51c80d3fa2b4e17c34a621a8532cca0 |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: If DEBUG is enabled, use a pointer type for data_stack_frame_t
This allows telling static analyzers to treat t_push() and t_pop() similarly
to malloc()/free() and check for leaks. |
3c5ee51327f075dc13cdacf46135f7f0abbdaafe |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Changed t_pop() API to make it a bit more like free() |
e2588872c1fe79642589b805aaab9fbb6750771b |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Created data_stack_frame_t type for data_stack_frame |
7bc9e4a3b0d68eefc9c14a58a8d9f946740f5be6 |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Small code cleanup to data-stack - use explicit data_stack_initialized
This will make it easier to change data_stack_frame's type. |
8cf55b1c05d0d0a19c95ebbc8390ceb1d36da4a9 |
|
02-Sep-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: Minor t_push() optimization - use unlikely() |
9745f03bbaaa3d15043d231b84128beecf97dd93 |
|
01-Aug-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib,lib-test: i_warning to i_debug on alloc growing messages |
0175d37a5ae5a4d146ca41b684bd38d9b03683cb |
|
30-May-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
Remove t_malloc in favour of t_malloc_no0
Using either t_malloc_no0 or t_malloc0 makes it clear whether the
allocated memory is zeroed or not. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
814bf67459ad405a157af0b8940602024d7fadfe |
|
23-Sep-2015 |
Teemu Huovila <teemu.huovila@dovecot.fi> |
Remove now-unnecessary direct stdlib.h #includes. |
50c05dde01f995445fedcb7a5db5ff0afd628327 |
|
21-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - fix pointer arithmetic compiler warning
Clang's -fsanitize=unsigned-integer-overflow barfs as follows:
data-stack.c:477:29: runtime error: negation of 8 cannot be represented in type 'unsigned long'
data-stack.c:495:15: runtime error: negation of 8 cannot be represented in type 'unsigned long'
Which is of course complete bollocks. There is no 8, there's only an 8ul, and
the negation of 8ul is 0xfffffff8ul (or a wider equivalent). That's the law.
However, the pointer arithmetic which follows the negation, whilst almost
certainly working in practice, is probably bogus, so just make the thing
signed before the negation, and both problems go away.
Reported-by: Teemu Huovila <teemu.huovila@dovecot.fi>
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
61dd0a240dda1ab398a8169a52225e66746d74a7 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - start sentry checks immediately after the reserved buffer
Our sentries are written with byte-precision, no need to round up before
doing the checks.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
c538e7faa75f4d43225087a936ea2d5a4d8d9dc8 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - add DEBUG size and sentry updating to t_try_realloc
Without this, t_pop() will report errors.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
6f8cb38591a8a721c45cafffde3430f549ba176e |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - fix incorrect pointer comparison in t_try_realloc in DEBUG builds
When trying to work out if it's a valid realloc, we need to remember
that in DEBUG builds, we have hidden a size value (in a MEM_ALIGNED
space) before the pointer we return.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
50a0a88ee62632d52c78ec95460b0759ce0a40e9 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - fix realloc/lowwater bug
If DEBUG is enabled, then it can try to look past the low-water mark
as the low-water mark wasn't moved during successful reallocs. This
condition is detected, and causes a panic.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
8aa1afdcdffc78b3f71e5c379fa799991edb007e |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - t_try_realloc get alloc size right in DEBUG builds
Also introduce a helper variable for the common expression for readability.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
395a730fac26f68dd1e197a168d07edbcb436730 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - helper for last alloc ends at block.data+(size-left)
Less to read, and less noisy.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
f9bee080651276b7baf037c3f0bd84e41a40a433 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - add vital sanity-preserving assert to t_pop
If something has re-ordered those two offsets, the following memset
will explode.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
f0a98b359e3d484a889e889e568513c276845e50 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - pull common code out of if/else branches in t_malloc_real
Once the new block is set up nicely empty for use, it can be used exactly
like an old block that has enough space - so just merge the code paths.
(This changeset best viewed ignoring whitespace.)
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
8dabb70ca5faaad4432ed182580103787c1c9c5a |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - reorder full current block code
Make the "enough space" and "block is full" branches in t_malloc_real
have the same code structure for parallelism. The 'block' variable is only
needed very locally, so shrink its scope, and avoid its use once it is
assigned to current_block, use that instead. Compacter readable expressions
have been favoured at the expense of longer lines (which will soon shrink).
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
e964357ce18f5fce6083044e3c867a6502711607 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - helper macro for requested/allocated size
Rather than #if/#else/#endif around such calculations, or even
having the possibility to mistype such expressions, just extract
the calculation into a helper macro defined appropriately for
the DEBUG mode.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
d9d576a2fd9683d2bbd758868c30be75654a6166 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - disambiguate sizes in t_pop_verify
In DEBUG mode, the allocated size is bigger than the requested size, so
rename the variable to reflect its real meaning, and move it into a
tighter scope in the process.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
801d6aa65c50d18af39afe7a6016a80b09462110 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - simplify expressions in data_stack_last_buffer_reset
Noisy expression used more than once, give it a meaningful name.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
437d3c47003e42bc30468d59911de948a5341110 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: data-stack - enable tighter sanity checks on stack_block allocations
The canary doesn't have to be NULL. That's only effective if it will be read
and dereferenced as a pointer. If used as an integer, it's a perfectly boring
one, and not likely to draw attention to itself.
Once the canary is in place, at least in debug mode, we can check it in
every function as a sanity check.
Make our poison stand out from other poison used elsewhere in the code.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
5517afec377fb7bf80e589b3efdd975f61dad5b3 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: cosmetic - whitespace cleanup in allocator/memory-related code
Indentation used spaces. Some trailing whitespace found.
$ git diff -w
$
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
eb8d3118050e27a7adcbd8e6f33fb3e3a99700b7 |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: add rudementary statistics gathering to data-stack debugging
These currently just enhance the overly-large alloc_size warning
message in t_malloc_real() to show what the history of allocations
is. New warnings look like this:
Warning: Growing data stack by 32768 as 'test_run_funcs' reaches 16416 bytes from 202 allocations.
Future possible directions:
t_malloc_real() could be further modified to identify badly-behaved
regions of code that allocate lots of smaller blocks as it happens
(which might be noisy). t_pop() could be modified to detect such code
after it exits its block (so just one warning per instance of
misbehaviour).
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
053e605c3b277f82953a60f6722a0a1557ccaf3d |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: add markers to data-stack debug prints
Only the DEBUG code will have access to the frame's marker. |
33b0119d4effb14cd0f1bdd3ad5f2954e3b1e63e |
|
28-Jul-2014 |
Phil Carmody <phil@dovecot.fi> |
lib: add identifying markers to data-stack frames
Add a string parameter to t_push() so that in DEBUG mode,
misbehaviour inside a stack level can be blamed on someone.
Default the T_BEGIN macro to automatigally use __FUNCTION__ or
__FILE__:__LINE__ as that identifier, therefore no clients of
those macros need to change.
ioloop used t_push() directly as it wanted customised diagnostic
strings. To preserve this friendliness, also introduce a t_push_named()
which takes a format string with paramters.
Apart from the unused paramter, a non-DEBUG build should see no
changes.
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
710129a6c8666e19df82a2a7349c7683d531f837 |
|
03-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Make sure errno isn't changed by vsnprintf()/malloc()/free() implementations.
They shouldn't, so this should only be a sanity check when running with
devel-checks. Various parts in the code rely on errno not being changed by
*_strdup_printf() calls. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
263df40da710e873103597f64c1733827d19c442 |
|
24-Nov-2013 |
Timo Sirainen <tss@iki.fi> |
Data stack has now an extra NULL pointer padding before its actual data starts.
This is just an extra safety measure against buffer overflows.
Patch by Jann Horn. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
e34d170f8f0e084bd94bfbc1a7085ece67e508df |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Make sure we check all the functions' return values. Minor API changes to simplify this.
Checked using a patched clang that adds attribute(warn_unused_result) to all
functions. This commit fixes several error handling mistakes. |
ce82f77b9f99138e6a72829718f9fe4d9cc6d241 |
|
10-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
--enable-devel-checks: If DEBUG_SILENT environment is set, hide "Growing pool" warnings. |
2a5d52ea734bdf25884af7a3141d7b4a0458b5fa |
|
26-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
data-stack: Fixed calling t_push()/t_malloc() before data_stack_init(). |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
e59faf65ce864fe95dc00f5d52b8323cdbd0608a |
|
25-Jan-2010 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2010.
--HG--
branch : HEAD |
989f453972b715bd366d69802ad0ae186a46c878 |
|
28-Oct-2009 |
Timo Sirainen <tss@iki.fi> |
data stack: Fixes to handling out-of-memory situations.
--HG--
branch : HEAD |
10b25ed61cbe92a1435b322a9c2fbda208473018 |
|
12-May-2009 |
Timo Sirainen <tss@iki.fi> |
DEBUG: data-stack buffer overflow checking code was causing false positives.
--HG--
branch : HEAD |
45312f52ff3a3d4c137447be4c7556500c2f8bf2 |
|
06-Jan-2009 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2009.
--HG--
branch : HEAD |
68493faba90fe7dcfa38cb690073bb710432a998 |
|
12-Jun-2008 |
Timo Sirainen <tss@iki.fi> |
t_get_bytes_available(): Return a bit less than is available because some
space is wasted to alignmentation (and for other things when DEBUG enabled).
--HG--
branch : HEAD |
aeb251b93170b3fd81bfcc4ebdbd09fae167bd20 |
|
11-May-2008 |
Diego Liziero <diegoliz@gmail.com> |
make outofmem_area static
--HG--
branch : HEAD |
00735667026615a3d8658382acee6dc33d7bff87 |
|
09-May-2008 |
Timo Sirainen <tss@iki.fi> |
Removed unused variable popped_frame_pos. Patch by Diego Liziero.
--HG--
branch : HEAD |
c438c40313ec4ccd348e5c3d199c2927cdce8906 |
|
01-Apr-2008 |
Timo Sirainen <tss@iki.fi> |
t_buffer_get() overflow check worked only with 64bit systems.
--HG--
branch : HEAD |
ea32546d6767b8e55e7afb744c20536e9cca9a91 |
|
30-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Catch if we write past t_buffer_get()ed memory.
--HG--
branch : HEAD |
86c99183534cba2ab402136f5cce0756aafe57b2 |
|
03-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Added t_buffer_alloc_last_full().
--HG--
branch : HEAD |
0dfbec54c240599df6ef8586d5e86d573551a6ec |
|
03-Mar-2008 |
Timo Sirainen <tss@iki.fi> |
Added t_buffer_alloc_last_full().
--HG--
branch : HEAD |
9d1b48f1fea247122a5851bd776f3dc3d370ca15 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Buffer overflow checking caused false errors sometimes.
--HG--
branch : HEAD |
537b8a5d08fe81a1a9217315cb6548d40d68aba5 |
|
21-Feb-2008 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Buffer overflow checking caused false errors sometimes.
--HG--
branch : HEAD |
76b43e4417bab52e913da39b5f5bc2a130d3f149 |
|
01-Jan-2008 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2008.
--HG--
branch : HEAD |
e77778e8557e159f10151268f4545fb310f18600 |
|
29-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Fixed buffer overflow checking code.
--HG--
branch : HEAD |
93974d212f6b229efc36c250728e0e2b87f109e5 |
|
29-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Don't access uninitialized memory.
--HG--
branch : HEAD |
5b745aa71bf74a7fddd6d25e2df43658bb80f41d |
|
22-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Fixed clearing data stack memory.
--HG--
branch : HEAD |
6a1e79cddfd373946888dda68e5ea6eeadd7dc8b |
|
22-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Crashfix
--HG--
branch : HEAD |
1f26811256337b0356b1a2240e9b64740f4a6002 |
|
22-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Removed DISABLE_DATA_STACK. Using it was probably broken anyway and it was
confusing having two implementations in the same file.
--HG--
branch : HEAD |
cd223c5b263e6c2ebb17d8b6f85dcb8485d5ef06 |
|
22-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Make sure memory allocated from data stack doesn't overflow the
buffer.
--HG--
branch : HEAD |
12074bd74410e289a31c41dc59c469889332e7f2 |
|
22-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Data stack wasn't cleared at t_pop() as it should have been. Also
ignore data_stack_set_clean_after_pop(FALSE) if DEBUG is enabled.
--HG--
branch : HEAD |
4da480172a2f77b2cf77ee7fb45ebebedfaf6cac |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
Added T_FRAME*() macros. It's too easy to accidentally break t_push/t_pop
pairing. These new macros make it a lot more difficult.
--HG--
branch : HEAD |
69792ba4c1e7c59e68b94b08bc5c3f76345a425a |
|
05-Dec-2007 |
Timo Sirainen <tss@iki.fi> |
If we fail with out of memory, make sure i_panic() can allocate enough
memory for itself.
--HG--
branch : HEAD |
c9bf63e9094761767a63ac6b189bcf60bcffdc44 |
|
17-Nov-2007 |
Timo Sirainen <tss@iki.fi> |
Use likely() and unlikely() macros to make commonly checked error handling
paths unlikely.
--HG--
branch : HEAD |
3a2a2b6625fd0291671f7aa4bcff105070fd3944 |
|
20-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
If data stack growing fails because of out-of-memory, something's probably
buggy so do assert() to dump core.
--HG--
branch : HEAD |
89a126810703c666309310d0f3189e9834d70b5b |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
--HG--
branch : HEAD |
43d32cbe60fdaef2699d99f1ca259053e9350411 |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.
--HG--
branch : HEAD |
7620f6e385d9eaa5b4a9dc7d73f6063b0e3b185b |
|
18-Mar-2007 |
Timo Sirainen <tss@iki.fi> |
Added data_stack_set_clean_after_pop()
--HG--
branch : HEAD |
b59efdf1f1f52cf08a63af4f88c4b687e8f0e77e |
|
10-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
GC optimization
--HG--
branch : HEAD |
333e77916f5c17eac34c77b54281a5e9435032c3 |
|
10-Sep-2006 |
Timo Sirainen <tss@iki.fi> |
Fixes for using GC
--HG--
branch : HEAD |
6ef7e31619edfaa17ed044b45861d106a86191ef |
|
13-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added "bool" type and changed all ints that were used as booleans to bool.
--HG--
branch : HEAD |
b9606c68e0ddb4e5b674370f98bff80393279947 |
|
27-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
Added t_get_bytes_available().
--HG--
branch : HEAD |
8afe3f0e832b8b3483b692205bbd59c0110a20fd |
|
13-Mar-2005 |
Timo Sirainen <tss@iki.fi> |
If we run out of memory, exit with FATAL_OUTOFMEM status instead of dumping
core. Also changed a few other i_panic() calls to others.
--HG--
branch : HEAD |
9695f2748f86bce28b7bb0963f7524872e272f0f |
|
10-May-2004 |
Timo Sirainen <tss@iki.fi> |
allow using data stack without data_stack_init().
--HG--
branch : HEAD |
81a07ac5ff4bb89761c2cf8d3e56ae902e4648e1 |
|
21-Sep-2003 |
Timo Sirainen <tss@iki.fi> |
Added support for Boehm GC. However it seems to be crashing for some reason
with me..
--HG--
branch : HEAD |
5e0ce63bb65db34d7f48b34bbb5545fa791781c4 |
|
26-Aug-2003 |
Timo Sirainen <tss@iki.fi> |
Removed most of the license comments from src/lib/*.c. It's just fine to
keep them in a single COPYING.MIT file. Changed a few other comments as well.
--HG--
branch : HEAD |
fd9972c1a2a630f3800ba4c73dd16cf03628cd50 |
|
26-Mar-2003 |
Timo Sirainen <tss@iki.fi> |
When data stack grew larger than two blocks, t_pop()ing crashed when trying
to free extra blocks.
--HG--
branch : HEAD |
ffb892dc927f09d077ad18b0142430e2c398e42f |
|
27-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Allow calling t_push() before data_stack_init().
--HG--
branch : HEAD |
c0435c854a0e7246373b9752d163095cc4fbe985 |
|
05-Jan-2003 |
Timo Sirainen <tss@iki.fi> |
Naming style changes, finally got tired of most of the typedefs. Also the
previous enum -> macro change reverted so that we don't use the highest bit
anymore, that's incompatible with old indexes so they will be rebuilt.
--HG--
branch : HEAD |
80d3b05559a9024b8352d52419a1b1c0aeca654e |
|
27-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Removed pool->realloc_min() which nothing used. A few small fixes to
alloc-only pool.
--HG--
branch : HEAD |
83af6bc7c870443e6de5078046015412ebb7747f |
|
22-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
t_try_realloc() wasn't working right with DISABLE_DATA_STACK.
--HG--
branch : HEAD |
e1e5b1f4ada9d9b4d36edeaf1c5229be90b12815 |
|
22-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
String function cleanups. Allocating 0 bytes of memory is treated as error
now, it could be an integer overflow. Moved printf_string_upper_bound() to
it's own file, so strfuncs.c can be with MIT license.
--HG--
branch : HEAD |
0c9754d1cf2ba0ff7873b6baa614ca10051a08fd |
|
22-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Use vsnprintf() always when possible, even if we went through the
upper_bound function. DEBUG message in data stack might have sometimes
caused an infinite loop. Made sure infinite loops don't happen anymore with
failure handlers. str_printfa() didn't handle %m. Made my_vsyslog() a lot
simpler, since t_strdup_printf() is now safe enough to call in failure
handler.
--HG--
branch : HEAD |
5254d77805cd35b9356d072ba325c356c43b0d51 |
|
18-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Marked all non-trivial buffer modifications with @UNSAFE tag. Several
cleanups and a couple of minor bugfixes.
--HG--
branch : HEAD |
db562225ac6e1f0e2b1a87af97f115febb09cba9 |
|
18-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Use a bit larger initial data stack size when DEBUG is set - current one is
too small for message searching.
--HG--
branch : HEAD |
def516ea503a60f20d510c14d5070b7ff5bbddf4 |
|
08-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
Added buffer API. Point is to hide all buffer writing behind this API which
verifies that nothing overflows. Much better than doing the same checks all
around the code, even if it is slightly slower.
Buffer reading is still mostly done directly, that isn't such a big security
risk and I can't think of a reasonable API for it anyway.
--HG--
branch : HEAD |
d4fa00df8f4db2868a0318b9f3f370cd50bd36c1 |
|
03-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
DEBUG: Don't send shrink messages, they could cause infinite loop.
--HG--
branch : HEAD |
cb0b6a1964a883798ad31700209af03c1a024bb7 |
|
01-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
crashfix when DEBUG was set.
--HG--
branch : HEAD |
2c95b21573244729e30908964eebc9b49c302ed1 |
|
01-Dec-2002 |
Timo Sirainen <tss@iki.fi> |
DEBUG: we get warnings when growing/shrinking data stack.
--HG--
branch : HEAD |
48740d482b5e929e95d9ef0d2e331dc67b7f3976 |
|
29-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
DEBUG: when t_pop()ing, fill the free'd memory area with 0xde bytes.
--HG--
branch : HEAD |
c9fae156bb2dd1f4d1e2632cb396d630a9efb0c1 |
|
28-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
changed t_push() and t_pop() to return unsigned int. added global
data_stack_frame which is used by TempString to verify it's accessed only
in the same frame.
--HG--
branch : HEAD |
b646fdb90f75ab80ea7feca42fa2e1f8e788b004 |
|
14-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
Split IOBuffer into mmaped IBuffer, file IBuffer, memory data IBuffer and
file OBuffer.
--HG--
branch : HEAD |
a51860200ee742ac0e9942d51b0f911776b25138 |
|
09-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
s/t_try_grow/t_try_realloc/
--HG--
branch : HEAD |
6d72e8dc3009c2850b74b39fecb72c32765156ac |
|
09-Oct-2002 |
Timo Sirainen <tss@iki.fi> |
s/temporary memory pool/data stack/ which is the correct name for it.
--HG--
branch : HEAD |