1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

501 Commits

Author SHA1 Message Date
Pavel Březina
64fdcda0c7 Talloc doc: talloc_pool() when not enough memory in the pool 2012-04-18 10:27:17 +02:00
Pavel Březina
75bcb28a95 Talloc doc: TALLOC_FREE_FILL 2012-04-18 10:27:16 +02:00
Pavel Březina
f8b589b793 Talloc doc: talloc_set_log_stderr()
Documents this function.
2012-04-18 10:27:16 +02:00
Pavel Březina
cf7f4612b5 Talloc doc: talloc_set_log_fn()
Documents this function.
2012-04-18 10:27:16 +02:00
Pavel Březina
73b0ed650a Talloc doc: talloc_set_abort_fn()
Documents this function.
2012-04-18 10:27:16 +02:00
Pavel Březina
30ca3915e5 Talloc doc: talloc_asprintf_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:16 +02:00
Pavel Březina
50689aee38 Talloc doc: talloc_strndup_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:16 +02:00
Pavel Březina
c5243a499f Talloc doc: talloc_strndup_append()
The destination string is reallocated instead of duplicating the result.
2012-04-18 10:27:15 +02:00
Pavel Březina
3502371a34 Talloc doc: talloc_strdup_append_buffer()
Explains the difference between _append and _append_buffer.
2012-04-18 10:27:15 +02:00
Pavel Březina
b233173f85 Talloc doc: talloc_strdup_append()
The destination string is reallocated instead of duplicating the result.
2012-04-18 10:27:15 +02:00
Stefan Metzmacher
91ffcdd5a9 talloc/testsuite: fix compiler warnings
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Jan 10 13:31:33 CET 2012 on sn-devel-104
2012-01-10 13:31:33 +01:00
Volker Lendecke
ad3c0e03e2 talloc: Slightly simplify talloc_unlink
Nested if's are hard to understand to me.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jan  2 19:07:23 CET 2012 on sn-devel-104
2012-01-02 19:07:23 +01:00
Volker Lendecke
0bee8719b2 talloc: Fix a typo 2012-01-02 14:59:59 +01:00
Jelmer Vernooij
86afe83d86 waf: Factor checking for undefined symbol flags out into separate method.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Nov 13 19:38:38 CET 2011 on sn-devel-104
2011-11-13 19:38:38 +01:00
Jelmer Vernooij
39ba9b93d7 talloc: Only check for pkg-config file when checking for system talloc. 2011-11-13 18:06:06 +01:00
Jelmer Vernooij
22c88fbc1d pytalloc-util: Don't mark as python extension, use pyembed instead. 2011-11-13 18:06:06 +01:00
Michael Adam
6560bca57e talloc: fix a comment typo 2011-10-26 02:44:02 +02:00
Stefan Metzmacher
6b06b0d3b4 talloc: simplifiy the logic to build talloc_testsuite in the standalone build
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct 22 13:15:52 CEST 2011 on sn-devel-104
2011-10-22 13:15:52 +02:00
Stefan Metzmacher
04fd3a9d69 talloc/testsuite: remove #if _SAMBA_BUILD_==3
We don't include "includes.h" anymore...

metze
2011-10-22 09:28:26 +02:00
Stefan Metzmacher
94bebb96c5 talloc: change version to 2.0.7
The version change is needed because the ABI file
of the pytalloc code was fixed.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 15 22:32:59 CEST 2011 on sn-devel-104
2011-09-15 22:32:59 +02:00
Volker Lendecke
4ee613ba64 talloc: Remove an unused variable
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Sep  7 16:47:26 CEST 2011 on sn-devel-104
2011-09-07 16:47:26 +02:00
Jelmer Vernooij
9fa8f27ed8 talloc: Fix talloc-compat pc files/headers.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Aug 21 04:53:07 CEST 2011 on sn-devel-104
2011-08-21 04:53:07 +02:00
Jelmer Vernooij
31912781ca wafsamba: Only install .pc files if libraries are public. 2011-08-21 03:22:05 +02:00
Jelmer Vernooij
4b94926ac3 pytalloc: Regenerate ABI file.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Aug 10 16:51:11 CEST 2011 on sn-devel-104
2011-08-10 16:51:11 +02:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Andrew Tridgell
abd2e25ee0 talloc: prepare for 2.0.6 release
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug  9 04:03:49 CEST 2011 on sn-devel-104
2011-08-09 04:03:49 +02:00
Andrew Tridgell
cf986f2008 talloc: ensure the sibling linked list remains valid during a free
This ensures that the sibling list of a pointer doesn't become invalid
during a free operation. It is an alternative fix to the fix in
6f51a1f45b, and avoids the problem of
trying to calculate the parent pointer early

This should fix the subtle spoolss talloc bug that Simo found

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Aug  9 01:53:17 CEST 2011 on sn-devel-104
2011-08-09 01:53:16 +02:00
Andrew Tridgell
73677875b4 talloc: check block count aftter references test
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-08-04 16:17:25 +10:00
Andrew Tridgell
d004fd0b53 talloc: added test suite for talloc_free_children()
this tests the fix from Simo

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Jul 29 11:30:13 CEST 2011 on sn-devel-104
2011-07-29 11:30:13 +02:00
Simo Sorce
52182a5281 talloc: preserve context name on talloc_free_children()
Otherwise tc->name will end up pointing to garbage when it is not
set to a const but rather to a string allocate as child of the context itself.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-29 18:17:44 +10:00
Jelmer Vernooij
78b54e9ee1 talloc: Support PYTHON environment variable.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jul 26 22:21:30 CEST 2011 on sn-devel-104
2011-07-26 22:21:30 +02:00
Stefan Metzmacher
df2cb2f672 talloc: splitout _talloc_free_children_internal()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 17 10:49:13 CEST 2011 on sn-devel-104
2011-05-17 10:49:13 +02:00
Stefan Metzmacher
38633c9f0b talloc: fixed a use after free error in talloc_free_children()
This is similar to commit 6f51a1f45b.

metze
2011-05-17 09:46:04 +02:00
Stefan Metzmacher
f3b855d2ff talloc: use _talloc_free_internal() in talloc_free_children()
metze
2011-05-17 09:46:04 +02:00
Stefan Metzmacher
37b2130ed9 talloc: test talloc_steal out of a talloc_pool
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 17 09:43:01 CEST 2011 on sn-devel-104
2011-05-17 09:43:01 +02:00
Stefan Metzmacher
16cc52cf70 talloc: add memset() calls to test_pool()
This way we the pool based valgrind code.

metze
2011-05-17 08:22:25 +02:00
Stefan Metzmacher
c281f2fc1a talloc: setup the new 'tc' before TC_UNDEFINE_GROW_CHUNK() _talloc_realloc()
metze
2011-05-17 08:22:23 +02:00
Stefan Metzmacher
7102105c89 talloc: make really sure only optimize realloc if there's only one pool chunk
*talloc_pool_objectcount(pool_tc) == 2 doesn't mean the one of the objects
is the pool itself! So we better check for == 1 and calculate the chunk count.

metze
2011-05-17 08:22:21 +02:00
Stefan Metzmacher
14b662ee4f talloc: make use of _talloc_free_poolmem() in _talloc_realloc()
This should follow the same logic...

metze
2011-05-17 08:22:20 +02:00
Stefan Metzmacher
2d514be1ed talloc: split the handling of FLAG_POOL/FLAG_POOLMEM in _talloc_free_internal
The optimization of the object_count == 1 case should only happen
for when we're not destroying the pool itself. And it should only
happen if the pool itself is still valid.

If the pool isn't valid (it has TALLOC_FLAG_FREE),
object_count == 1 does not mean that the pool is the last object,
which can happen if you use talloc_steal/move() on memory
from the pool and then free the pool itself.

Thanks to Volker for noticing this!

metze
2011-05-17 08:22:18 +02:00
Stefan Metzmacher
f0f5ac18e5 talloc: use TC_UNDEFINE_SHRINK_CHUNK() instead of TC_INVALIDATE_SHRINK_CHUNK() for realloc path
If we optimize on top of raw realloc() we need
TC_INVALIDATE_SHRINK_CHUNK together with TC_UNDEFINE_GROW_CHUNK
(with was missing and caused false positive valgrind warnings).

But that is really slow, as we do a lot of talloc_realloc calls in samba.

That's why we only to TC_UNDEFINE_SHRINK_CHUNK() for now.

metze
2011-05-02 13:58:22 +02:00
Jelmer Vernooij
fb05e82c99 Fix license info for talloc in manpage.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Apr 24 03:27:54 CEST 2011 on sn-devel-104
2011-04-24 03:27:54 +02:00
Stefan Metzmacher
94a97bf64c talloc: fix compiler warnings with -Wc++-compat
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Apr 13 14:33:23 CEST 2011 on sn-devel-104
2011-04-13 14:33:23 +02:00
Stefan Metzmacher
eb0e276f3a talloc/testsuite: avoid memory leak reported by valgrind
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Apr  8 10:15:41 CEST 2011 on sn-devel-104
2011-04-08 10:15:40 +02:00
Stefan Metzmacher
f9fdef870e talloc/testsuite: test more talloc_pool related things
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
2146ffd764 talloc: include valgrind headers if available
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
73cc85ac90 talloc: add TC_INVALIDATE_POOL marco
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
9c9f208598 talloc: add TC_UNDEFINE_GROW_CHUNK() marco
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
6126c3506d talloc: add TC_INVALIDATE_SHRINK_CHUNK() marco
This invalidates the unused bytes if we shrink memory.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
4895f55f06 talloc: add TC_INVALIDATE_FULL_CHUNK() macro
This makes it easier to mark a talloc pointer as
invalid.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
efbb35824e talloc: use VALGRIND_MAKE_MEM_UNDEFINED() before memmove()
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
1e70439f77 talloc: optimize talloc_free() and talloc_realloc() for talloc pools
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
73330f8436 talloc: add TC_POOL_FIRST_CHUNK() macro
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
13fab67995 talloc: add TC_POOL_SPACE_LEFT() macro
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
4084cb723c talloc: add TC_ALIGN16() macro
metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:10 +02:00
Stefan Metzmacher
d39940113a talloc: use TC_HDR_SIZE instead of sizeof(struct talloc_chunk)
As this includes the padding to 16 bytes.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
2011-04-08 09:28:09 +02:00
Matthias Dieter Wallnöfer
513574afd7 talloc - some documentation changes
- Fix some typos
- Document better the differences in the behaviour between talloc 1.X and 2.X.
  Previously this seemed a bit spongy to me.

Reviewed-by: Jelmer + Tridge

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Apr  4 11:05:42 CEST 2011 on sn-devel-104
2011-04-04 11:05:42 +02:00
Matthias Dieter Wallnöfer
6723e90d52 talloc - improve doxygen comment of "talloc_move"
Express better that this should be a pointer of a pointer.

Reviewed-by: Tridge
2011-03-30 08:45:58 +02:00
Andrew Tridgell
c56e3ccfc9 lib: don't install public headers if a private library
for talloc/tevent/tdb, only install headers if we are doing a
standalone build
2011-03-15 12:22:20 +11:00
Andrew Tridgell
e3e1eada45 talloc: use public_headers to install talloc.h and pytalloc.h
this allows them to be included in the test_headers.h generated header
2011-03-15 12:22:18 +11:00
Andrew Tridgell
8b8caac6d0 build: removed the old autogen.sh and autogen-waf.sh scripts
for the builds that use waf only, these are no longer needed and just
cause confusion

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 15:03:40 +11:00
Andrew Tridgell
005c6370cd waf: ensure "make dist" works from a clean git tree for all libraries
this uses a temporary waf lock file to force the build directory

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Jan  8 02:35:22 CET 2011 on sn-devel-104
2011-01-08 02:35:22 +01:00
Stefan Metzmacher
d9fd1f684a talloc: change version to 2.0.5 after a critical bugfix
metze
2011-01-05 10:24:47 +01:00
Andrew Tridgell
6f51a1f45b talloc: fixed a use after free error
this is the minimal fix for the problem Rusty found. I previously
thought that the best fix would be to change tc->parent to be valid
for all pointers, but that is expensive for realloc with large numbers
of child pointers, which is much more commmon than I expected it to
be.

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Jan  5 07:22:27 CET 2011 on sn-devel-104
2011-01-05 07:22:27 +01:00
Andrew Tridgell
66db49e35f talloc: added a test for the use after free Rusty found 2011-01-05 06:37:07 +01:00
Jelmer Vernooij
733bc1c1ca talloc: Clarify error message on access after free. 2011-01-05 01:01:28 +01:00
Brad Hards
564830ef90 talloc: Typo fix for api docs 2011-01-04 14:46:07 +11:00
Brad Hards
10b1ed670f talloc: Fix warnings in test code
This should not change any behaviour - the intent is just to reduce
the "nuisance" warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan  3 11:12:39 CET 2011 on sn-devel-104
2011-01-03 11:12:39 +01:00
Jelmer Vernooij
fdb0aa2b04 Revert broken destructor changes. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
cbf504b0c5 s4-python: Properly call PyObject_Del from all destructors. 2011-01-03 01:48:04 +01:00
Jelmer Vernooij
5792fa90ac s4-python: Only set BASETYPE flag if subclassing is supported.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jan  1 03:39:58 CET 2011 on sn-devel-104
2011-01-01 03:39:58 +01:00
Jelmer Vernooij
f5fe9c32ef s4-python: Add more prototypes. 2011-01-01 02:54:05 +01:00
Jelmer Vernooij
4350e0c3c9 s4-python: Properly call PyObject_Del from all destructors. 2011-01-01 02:54:05 +01:00
Jelmer Vernooij
51239bb26a talloc/tdb/tevent: Remove obsolete signatures files. 2011-01-01 02:54:05 +01:00
Jelmer Vernooij
bfb9ae2414 talloc: remove autotools support. 2010-12-24 01:15:05 +01:00
Jelmer Vernooij
4663a6a66e talloc: Remove reference to nonexistant configure.developer in autogen.sh. 2010-12-21 19:43:04 +01:00
Jelmer Vernooij
68d97f8b49 talloc: Add ability to generate Python docs using pydoctor. 2010-12-11 03:30:06 +01:00
Matthieu Patou
8733738357 build: introduce SAMBA_CHECK_PYTHON_HEADERS
This function is a wrapper around waf's check_python_header.
It avoids searching more than once for the headers bringing a small
speed improvement and a better lisibility of the logs.

But it's mainly to avoid a nasty bug when python libraries are in path
pointed by python_LIBPL (ie. /usr/local/lib/python2.6/config/) instead
of python_LIBDIR (ie. /usr/local/lib).

On the first call waf will correctly find that in order to link with
python libs it needs to add -L$python_LIBPL.

But on the next calls of check_python_headers, waf will use both the
current library path value (ie. -L/usr/local/lib/python2.6/config) and
-L$python_LIBDIR (ie. /usr/local/lib/) which will make him beleive that
python libraries are in $python_LIBDIR which at the end will make the
final link test fails in check_python_headers as it will not use the
good directory.

So by avoiding calling check_python_headers more than once we avoid
making waf fooling itself.
2010-12-10 02:07:18 +03:00
Stefan Metzmacher
e1485c70fc talloc: pytalloc-util should not have an ABI-file yet
Somehow I forgot to remove this after discussion with Jelmer.

metze
2010-12-09 16:45:50 +01:00
Andrew Tridgell
57f2f1d72a waf: remove the restriction that private libraries must not have a vnum
we need the vnum for ABI checking for public libraries built as
private libraries when bundled

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Dec  9 12:47:41 CET 2010 on sn-devel-104
2010-12-09 12:47:40 +01:00
Andrew Tridgell
ebe2867fc2 waf-abi: auto-generate per-symbol versions from ABI files
This changes our version-script generation to use the ABI files that
are saved in git with each version number change of our public
libraries.

We use these ABI files to generate a linker version script that gives
the exact version number that each symbol was introduced. This
provides us with automatic fine grained symbol versioning.

Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-09 13:17:19 +11:00
Stefan Metzmacher
658f4597ee talloc: build pytalloc-util with the same logic as libtalloc
metze
2010-12-08 19:07:13 +01:00
Stefan Metzmacher
8c6b756aa7 talloc: mark pytalloc-util functions as _PUBLIC_
metze
2010-12-08 19:07:12 +01:00
Stefan Metzmacher
288383aa83 talloc: remove unused PyString_FromString_check_null() from pytalloc-util
metze
2010-12-08 19:07:11 +01:00
Andrew Tridgell
735c1cd2da s4-pkgconfig: add @LIB_RPATH@ to our link flags
this is only set when rpath is used on install. It ensures that
applications that link against Samba libraries get the rpath right

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Dec  8 12:46:00 CET 2010 on sn-devel-104
2010-12-08 12:46:00 +01:00
Jelmer Vernooij
8897935660 pytalloc: Add docstring for talloc.Object.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Dec  5 18:12:59 CET 2010 on sn-devel-104
2010-12-05 18:12:59 +01:00
Stefan Metzmacher
88ff7e3c5c talloc: add ABI/talloc-2.0.4.sigs
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec  3 11:35:45 CET 2010 on sn-devel-104
2010-12-03 11:35:45 +01:00
Jelmer Vernooij
ceb1e176aa talloc: Bump version number after pytalloc changes. 2010-12-03 03:40:21 +01:00
Jelmer Vernooij
efd8fc0672 pytalloc: Make py_talloc_default_cmp private. 2010-12-01 01:48:25 +01:00
Jelmer Vernooij
b8dc3c8a83 pytalloc: Make py_talloc_dealloc private. 2010-12-01 01:48:25 +01:00
Jelmer Vernooij
4f0436f107 pytalloc: Make py_talloc_default_repr private (now exposed by talloc.Object). 2010-12-01 01:48:25 +01:00
Jelmer Vernooij
5891e9863c pytalloc: Expose PyTalloc_GetObjectType 2010-12-01 01:48:25 +01:00
Jelmer Vernooij
36bdb3b9af pytalloc: Add convenience function for checking if something is a talloc
object.
2010-12-01 01:48:24 +01:00
Jelmer Vernooij
e8aa266c97 talloc: Add talloc object.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Nov 30 23:26:56 CET 2010 on sn-devel-104
2010-11-30 23:26:56 +01:00
Andrew Tridgell
999f3ed2ce talloc: added TALLOC_FREE_FILL environment variable
when this environment variable is set, talloc will fill freed memory
with the value from that environment variable. This can be used to
help find use after free bugs when valgrind is too slow to be used
2010-11-19 15:17:42 +11:00
Jelmer Vernooij
0d6f1a1630 pytalloc: Make some arguments optional. 2010-11-07 01:39:39 +01:00
Jelmer Vernooij
cd172e7724 talloc: Add python talloc module, move convenience functions to it.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Nov  5 02:48:21 UTC 2010 on sn-devel-104
2010-11-05 02:48:21 +00:00
Jelmer Vernooij
4edabb3256 talloc: rename pytalloc.c to pytalloc_util.c 2010-11-05 02:06:06 +00:00
Andrew Tridgell
14718a725b build: a more portable way of finding waf in makefiles
this avoids using the non-portable shell command in makefiles

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 22:44:59 UTC 2010 on sn-devel-104
2010-11-03 22:44:59 +00:00
Andrew Tridgell
f0a472a2d6 waf: added reconfigure targets to our libraries
This allows you to do "make reconfigure" to re-run configure only if
needed
2010-11-03 01:34:04 +00:00
Jelmer Vernooij
ce1eb1f726 talloc: Install pytalloc.h.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Nov  1 17:25:07 UTC 2010 on sn-devel-104
2010-11-01 17:25:07 +00:00
Jelmer Vernooij
d5883c8d00 replace/talloc: Avoid automatically pulling in new configure/Makefile,
as these files are checked in, and the source might not be available.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 22:27:56 UTC 2010 on sn-devel-104
2010-10-31 22:27:56 +00:00
Jelmer Vernooij
f6cfa86607 talloc: Look harder for waf.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 18:06:16 UTC 2010 on sn-devel-104
2010-10-31 18:06:16 +00:00
Jelmer Vernooij
f99c009b61 replace: Build using waf by default.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:45:21 UTC 2010 on sn-devel-104
2010-10-31 02:45:21 +00:00
Jelmer Vernooij
4f22cc7a28 talloc: Switch over to using waf as the default build system for the standalone build. 2010-10-31 02:04:05 +00:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Jelmer Vernooij
23b58804ba talloc.3: Remove documentation for deprecated talloc_append_string,
consistent with other deprecated functionality.
2010-10-30 15:43:53 +02:00
Jelmer Vernooij
56b46d8d88 talloc: Fix manual pages in standalone build. 2010-10-30 08:27:12 +02:00
Stefan Metzmacher
4c634a3b2e talloc: fix waf build for libtalloc-compat1
We need to use 'libtalloc.so.1' as soname, otherwise the
compat library is useless.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Oct 27 03:53:21 UTC 2010 on sn-devel-104
2010-10-27 03:53:21 +00:00
Jelmer Vernooij
a702c07e02 talloc: change pytalloc-util to be a public library. 2010-10-26 10:17:19 -07:00
Jelmer Vernooij
d44e3bf747 talloc: Install pytalloc-util as system library. 2010-10-26 10:17:19 -07:00
Jelmer Vernooij
98cfc71801 talloc: Avoid dependency on unknown EXT_LIB_PYTHON. 2010-10-26 10:17:19 -07:00
Jelmer Vernooij
1ae0981ce8 talloc: Move pytalloc to lib/talloc. 2010-10-26 10:17:18 -07:00
Jelmer Vernooij
50256c01d0 waf: Only specify vnum for non-private libraries. 2010-10-26 10:17:18 -07:00
Stefan Metzmacher
177aad556f talloc: pytalloc should not depend on samba specific code
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Oct 24 19:21:25 UTC 2010 on sn-devel-104
2010-10-24 19:21:25 +00:00
Jelmer Vernooij
49ef288819 waf: Rename some BUNDLED_ functios to PRIVATE_. 2010-10-23 22:24:06 +00:00
Andrew Tridgell
7cba3cfac8 waf: replace the is_bundled option with private_library
'private_library' better captures what we are trying to get at when we
bundle a library
2010-10-21 19:03:24 +11:00
Andrew Tridgell
713900b812 s4-build: fixed some formatting
indentation was far too deep
2010-10-21 19:03:24 +11:00
Kamen Mazdrashki
c0b9526aaf pytalloc: use talloc_unlink() to free py_talloc objects
Those type of objects are referenced every time we assign
them to other py_talloc objects, which leads to runtime
warnings that we are trying to free an object with references

Wrap talloc_unlink() in SMB_ASSERT() to ensure we catch possible failure

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Wed Oct 20 21:37:06 UTC 2010 on sn-devel-104
2010-10-20 21:37:06 +00:00
Simo Sorce
feb6034581 talloc: make header C++ safe
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Wed Oct 20 18:15:09 UTC 2010 on sn-devel-104
2010-10-20 18:15:09 +00:00
Jelmer Vernooij
3cd558dbeb talloc: Fix #include line in manpage.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct  9 13:53:25 UTC 2010 on sn-devel-104
2010-10-09 13:53:24 +00:00
Kamen Mazdrashki
76a8ae9e0d pytalloc: Fix warning that we are subtracting void* pointers
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Fri Oct  8 23:36:54 UTC 2010 on sn-devel-104
2010-10-08 23:36:54 +00:00
Volker Lendecke
b5ed09c3af Move talloc_enable_null_tracking() to the s3 daemons 2010-10-08 21:11:45 +02:00
Andrew Tridgell
bb0017615d waf: fixed exit status of test suites
use RUN_COMMAND() to handle signal errors and exit status
2010-10-07 14:29:21 +11:00
Volker Lendecke
e325a5b674 talloc: Add a warning about talloc_autofree_context() and dlclose() 2010-09-24 17:21:42 -07:00
Jelmer Vernooij
049c4fa04d pytalloc: Add default compare function. 2010-09-21 11:47:03 -07:00
Jelmer Vernooij
a7393449eb pidl: Fix segfault when accessing unicode objects. 2010-09-20 22:40:46 -07:00
Andrew Tridgell
ba2c394ed4 talloc: fixed spelling errors in comment 2010-09-15 15:39:34 +10:00
Andrew Tridgell
58d92cefe2 pidl-python: cope with NULL pointers in more places
NULL is converted to Py_None
2010-09-02 13:37:07 +10:00
Andrew Tridgell
e7e39584a9 pytalloc: treat a NULL ptr as Py_None 2010-09-02 13:37:07 +10:00
Andrew Tridgell
634e06e465 pytalloc: fixed py_talloc_steal()
py_talloc_steal() was implemented as a macro which evaluated it's 2nd
argument twice. It was often called via a macro with a 2nd argument
that was a function call, for example an allocation in
py_talloc_new(). This meant it allocated memory twice, and leaked one
of them.

This re-implements py_talloc_steal() as a function, so that it only
does the allocation once.
2010-08-25 23:05:05 +10:00
Andrew Tridgell
d78417a5d6 s4-pytalloc: use better names for python talloc objects 2010-08-25 23:05:05 +10:00
Matthias Dieter Wallnöfer
2de63aa280 talloc:documentation - explain that "talloc_free" works also with "NULL" pointers
(talloc.c)
...
> static inline int _talloc_free_internal(void *ptr, const char *location)
> {
>        struct talloc_chunk *tc;
>
>        if (unlikely(ptr == NULL)) {
>                return -1;
>        }
>
>        tc = talloc_chunk_from_ptr(ptr);
...

Obviously this never had been documented before.
2010-08-14 18:48:20 +02:00
Jelmer Vernooij
bd1786f7f1 wafsamba: Fix typo: noextenion -> noextension. 2010-06-19 12:10:29 +02:00
Jelmer Vernooij
8c017022db talloc: Don't set is_bundled for standalone build. 2010-05-31 13:57:03 +02:00
Jelmer Vernooij
f98bb7ffc3 Add manpages argument to SAMBA_LIBRARY(). 2010-05-31 13:56:25 +02:00
Jelmer Vernooij
3858b5db8b s4-waf: sanitize library names like the old build system did, only add
-samba4 suffix for libraries that are bundled.
2010-05-31 03:28:42 +02:00
Andreas Schneider
876ed034c8 talloc: Fixed a doxygen problem with PRINTF_ATTRIBUTE. 2010-05-10 10:28:37 +02:00
Andreas Schneider
82900073fb talloc: Documented the missing string functions. 2010-05-06 18:14:09 +02:00
Holger Hans Peter Freyther
485def3b5d talloc: Documentation fix for talloc 2010-05-01 15:20:24 +02:00
Andrew Tridgell
45be1c7ba4 talloc: there is no ambiguity when freeing a ptr with a null parent
when a ptr has a single reference and a NULL parent, then
talloc_free(ptr) is not ambiguous, as the caller could not have done a
talloc_free(NULL) to free the memory

Pair-Programmed-With: Rusty Russell <rusty@samba.org>
2010-04-20 15:50:27 +10:00
Andrew Tridgell
7aa4c11fc4 build: more adjustments for the ABI type name maps
- use 'va_list' instead of 'struct __va_list_tag *'
  Using the C name for va_list is preferable

- add support for negative ABI name matches in abi_match=.  That is
  used to exlude ldb_*module_ops from the ldb ABI

- don't include the ldb module ops or backend ops in the ABI
2010-04-18 18:24:27 +10:00
Andrew Tridgell
f96353adcf s4-waf: rebuild signature files with the api type maps
This is not strictly necessary, as the old types would compare equal,
but it is neater to use the generic type names
2010-04-18 15:39:59 +10:00
Andrew Tridgell
ef496e8d1d talloc: mark public functions as _PUBLIC_ 2010-04-18 15:00:37 +10:00
Andrew Tridgell
1bcd900912 talloc-waf: added ABI checking for talloc 2010-04-18 15:00:37 +10:00
Andrew Tridgell
c10d267a76 s4-waf: don't try to use the system lib for the library build
when building library FOO, don't try to find the system library FOO
    
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-13 23:03:27 +10:00
Andrew Tridgell
42505df161 talloc-waf: the talloc1-compat lib depends on talloc
It is a library linked to another library, not a 2nd copy of talloc.c

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-13 20:15:41 +10:00
Andrew Tridgell
ab9e5047d7 talloc-waf: added the manpage generation and talloc1-compat generation
this allows the RPM spec file to be used with only a tiny mod (using
autogen-waf.sh instead of autogen.sh and using ln -sf for the library
links instead of ln -s)

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-13 17:34:44 +10:00
Andrew Tridgell
98942c8d84 build: use a common autogen-waf.sh for all builds
the symlink will get updated with the right target when waf dist is
used in each directory
2010-04-12 11:17:35 +10:00
Andrew Tridgell
7ae4372124 s4-waf: fixed waf distcheck for our standalone libs and s4 2010-04-06 20:27:26 +10:00
Andrew Tridgell
fe060c8f50 s4-waf: added simple 'waf test' support for tdb, talloc and ldb 2010-04-06 20:27:26 +10:00
Andrew Tridgell
ccfce0bbae s4-waf: autogen-waf.sh for the standalone library builds 2010-04-06 20:27:25 +10:00
Andrew Tridgell
c8835f440a s4-waf: use a common pattern for finding buildtools and libs 2010-04-06 20:27:25 +10:00
Andrew Tridgell
553324bc10 s4-waf: move to a universal method of recursing into subdirs
This works with both standalone lib builds and bundled builds
2010-04-06 20:27:25 +10:00
Andrew Tridgell
8dc8d31f4a s4-waf: fixed finding of buildtools and srcdir 2010-04-06 20:27:25 +10:00
Andrew Tridgell
1883ee6dbc s4-waf: avoid having to run waf configure before waf dist
This should be useful for building tarballs from a clean checkout
2010-04-06 20:27:25 +10:00
Andrew Tridgell
9e9e878e8f s4-waf: allow standalone tarball build of libraries 2010-04-06 20:27:25 +10:00
Andrew Tridgell
528d7c7cf3 s4-waf: added 'waf dist' to our standalone libs as well 2010-04-06 20:27:25 +10:00
Andrew Tridgell
c8062fb65e s4-waf: added 'waf dist' to build the tarball 2010-04-06 20:27:24 +10:00
Andrew Tridgell
2bf15566c6 talloc-waf: install talloc.pc if standalone 2010-04-06 20:27:24 +10:00
Andrew Tridgell
f01f74b2be talloc-waf: match version number with main build 2010-04-06 20:27:23 +10:00
Andrew Tridgell
874e39cbf0 s4-waf: added implied_deps for system libraries
when we use a system version of a library such as talloc, then we
no longer get the automtica dependency propogation of talloc implying
libreplace. That means we don't get the includes for libreplace, which
means things can fail to build.

To fix this this change adds an implied_deps option to
CHECK_BUNDLED_SYSTEM(), which tells the samba_deps module to add an
implied dependency on the listed targets if the system library is
chosen.
2010-04-06 20:27:17 +10:00
Andrew Tridgell
4256382094 talloc-waf: don't build the talloc testsuite in s4
its built into smbtorture already
2010-04-06 20:27:16 +10:00
Andrew Tridgell
bfbf43cc36 s4-waf: support the use of system libraries
distros can set --bundled-libraries=NONE to force use of all system
libraries. If the right version isn't found then configure will fail.

Users may choose which libraries to use from the system, and which to
use bundled libs. The default is to try system libs, and use them if
their version matches the one in the source tree.
2010-04-06 20:27:13 +10:00
Andrew Tridgell
c2d17cf978 s4-waf: set default for bundled libraries 2010-04-06 20:27:12 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
6ef00262ef build: don't install talloc_testsuite and ldbtest 2010-04-06 20:26:54 +10:00
Andrew Tridgell
065e3e2509 build: using deps= for deps is clearer 2010-04-06 20:26:39 +10:00
Andrew Tridgell
a3421fe6e9 build: added BUILD_SUBDIR() wrapper 2010-04-06 20:26:35 +10:00
Andrew Tridgell
9a1cd09a10 build: added ADD_CFLAGS() and started of Samba4 build 2010-04-06 20:26:34 +10:00
Andrew Tridgell
2b5a1cc70c build: added waf build rules for ldb 2010-04-06 20:26:34 +10:00
Andrew Tridgell
8f062f4a0f build: neater way to find libreplace and start on tevent waf build 2010-04-06 20:26:33 +10:00
Andrew Tridgell
5c103b484f build: renamed autoconf.py to wafsamba.py and added SAMBA_*() functions 2010-04-06 20:26:33 +10:00
Andrew Tridgell
34b77a15d3 build: updates to waf scripts for replace and talloc 2010-04-06 20:26:33 +10:00
Andrew Tridgell
9757da515d build: a first attempt at waf build for talloc and libreplace
very rough so far
2010-04-06 20:26:33 +10:00
Andrew Tridgell
fde50c633f talloc: a useful bit of debug code
this is useful when tracking down talloc loops. It is probably too
expensive to have on by default.
2010-04-02 18:52:29 +11:00
Andrew Tridgell
1b4bbec523 talloc: add a define for TALLOC_MAX_DEPTH
Thanks to the suggestion from simo
2010-04-02 18:52:29 +11:00
Andrew Tridgell
5ccd30e9ac talloc: change talloc minor version to 2.0.2
this has the talloc_is_parent() bugfix
2010-04-02 13:15:18 +11:00
Andrew Tridgell
ff2b7d42e6 talloc: limit the depth that talloc will go for talloc_is_parent()
We have a bug in the dcerpc registry code that can cause a talloc loop
that chews unlimited CPU because of talloc_is_parent() during a
talloc_free()
2010-04-02 13:15:18 +11:00
Andrew Tridgell
7ed349cace pytalloc: allow for using a system libtalloc-dev with pytalloc
When we have a system talloc library, we still need to grab pytalloc.h
from lib/talloc. We don't want to just use -Ilib/talloc, as otherwise
we'll get the in-tree talloc.h which may not be compatible with the
system talloc.h

So we need to give the path to pytalloc.h
2010-03-29 21:34:29 +11:00
Andrew Tridgell
08faa3a43c talloc: testsuite should use <talloc.h> not "talloc.h"
if we are using the system talloc, the testsuite needs to use the
system talloc.h
2010-03-29 21:34:29 +11:00
Kamen Mazdrashki
d142d9fb64 doxygen: talloc_get_type name fixed in Doxygen documentation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:11:55 +01:00
Simo Sorce
6339de7f4f release-scripts: parametrize scripts
This should make it easier to keep all release scripts alined as it will reduce
the difference between them to ideally a few variables

Also moves the tdb script in the scripts directory.
2010-02-08 10:29:06 -05:00
Simo Sorce
6bf2a821b7 talloc: Fix abi checks in release script
We must perform abi checks against the version we are going to release.
Not against the current tree we are in.
2010-02-08 10:12:50 -05:00
Simo Sorce
1422a94654 talloc: Fix abi checks and ifdefs
teach the abi check scripts to skip the DOXYGEN sections
fix the header to use #ifdef DOXYGEN and not #if DOXYGEN
2010-02-08 10:02:49 -05:00
Andrew Tridgell
7fed22eb0a talloc: fixed doc typo 2010-02-08 11:04:59 +11:00
Andreas Schneider
da0e396deb Move the talloc details to the mainpage.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Andreas Schneider
52c0cd38fa talloc: Added doxygen config file.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Andreas Schneider
fbd646a783 talloc: Documented talloc with doxygen.
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-08 11:04:59 +11:00
Matt Kraai
2cb2d5317f Change uint_t to unsigned int in lib/talloc
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Jelmer Vernooij
c42242d132 s4: Include Python.h early to avoid double definition errors. 2010-01-21 16:15:10 +13:00
Brian Lu
eff6022d51 talloc: create symbol links to shared libraries see https://bugzilla.samba.org/show_bug.cgi?id=6991 for details
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-06 14:27:44 +01:00
Simo Sorce
7f956869ff Fix release script to work with recent git versions 2009-12-15 09:17:25 -05:00
Kamen Mazdrashki
8efabcc8a5 talloc: Fix write behind memory block
If ALWASY_REALLOC is defined and we are to 'shrink' memory block,
memcpy() will write outside memory just allocated.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-08 12:39:10 +11:00
Simo Sorce
6618a062a1 talloc: Fix exports and increment talloc version 2009-10-14 11:05:52 -04:00
Simo Sorce
8fb483b296 talloc: Make abi checks in release script
Make always sure the exports and signature files are up to date before
shipping a release.
2009-10-14 11:05:52 -04:00
Simo Sorce
8e6df560b7 talloc: Move release script under /script too 2009-10-14 11:05:52 -04:00
Simo Sorce
2d6d6bcb5d talloc: Change the way mksysms work
Make sure we always have a sorted (per file) export file.
This way we can directly compare the real export and the check file w/o having
to further sort things.

Also return error code from abi_checks.sh if warnings were reported
2009-10-14 11:05:51 -04:00
Jelmer Vernooij
830adcd58d pidl: Avoid using talloc_free as function pointer, since it may be a
macro.
2009-09-28 15:03:17 +02:00
Andrew Tridgell
3c5d763962 talloc: fixed talloc_disable_null_tracking()
When we disable null tracking, we need to move any existing objects
that are under the null_context to be parented by the true NULL
context.

We also need a new talloc_enable_null_tracking_no_autofree() function,
as the talloc testsuite cannot cope with the moving of the autofree
context under the null_context as it wants to check exact counts of
objects under the null_context, and smbtorture has a large number of
objects in the autofree_context from .init functions
2009-09-20 13:14:40 -07:00
Andrew Tridgell
78338d431c talloc: don't crash if f is NULL in talloc_report_*
It's annoying when you use 
  p talloc_report_full(ctx, fopen("/tmp/xx","w"))
in gdb, and if you don't have write permission on the file then
you get a segv.
2009-09-17 21:52:28 -07:00
Andrew Tridgell
00fb6705ff talloc: when we enable NULL tracking, reparent the autofree context
If NULL tracking is enabled after the autofree context is initialised
then autofree ends up separate from the null_context. This means that
talloc_report_full() doesn't report the autofree context. Fix this by
reparenting the autofree context when we create the null_context.
2009-09-15 18:45:41 -07:00
Michael Adam
ea2b9e0fb1 talloc:mksigs: allow PRINTF_ATTRIBUTE(..) macros function types as funcion args
Michael
2009-09-11 15:31:35 +02:00
Michael Adam
56c09d2fb2 talloc:mksigs: normalize bool -> _Bool
Michael
2009-09-11 15:31:35 +02:00
Michael Adam
82404ad3e4 talloc:mksigs: ignore symbols (like _DEPRECATED_) after closing function parentheses
Michael
2009-09-11 15:31:33 +02:00
Michael Adam
629ff2b6e2 talloc:mksigs: correctly ignode multiline function typedefs
by first concatenating multilint parentheses and removing typefes afterwards.

Michael
2009-09-11 15:31:33 +02:00
Michael Adam
7b0e072631 talloc:mksigs: ignore struct forward declarations.
Michael
2009-09-11 15:31:32 +02:00
Michael Adam
e60c775835 talloc:mksyms: allow characters after closing functions parenthesis.
Michael
2009-09-11 15:31:32 +02:00
Michael Adam
fd55479981 talloc:mksyms: allow double pointer return value of functions.
Michael
2009-09-11 15:31:32 +02:00
Andrew Tridgell
27b19eb9f6 report the location of the original talloc_free on double free
When we get a double free abort from talloc it is often hard to work
out where the first free came from. This patch takes advantage of the
fact that _talloc_free() now takes a location the free was called from
to allow the double free abort code to print the location of the first
free that conflicts.
2009-09-04 14:40:51 +10:00
Michael Adam
700533a748 One would expect I could spell my name. 2009-08-30 00:56:03 +02:00
Michael Adam
c7d9617259 talloc: move the original abi_checks script to script/abi_checks_gcc.sh
Michael
2009-08-30 00:51:53 +02:00
Michael Adam
d9b193189a talloc: remove talloc_free from the exports
Michael
2009-08-30 00:51:53 +02:00
Michael Adam
fe0b5234ba talloc: run abi_checks as part of "make test"
Michael
2009-08-30 00:51:52 +02:00
Michael Adam
4e9a06d601 talloc: remove files generated by "make abi_check" in "make clean"
Michael
2009-08-30 00:51:52 +02:00
Michael Adam
cbc75c11fd talloc: add a target "abi_checks" to talloc.
Simply run "make abi_checks" to call the abi check script appropriately.

Michael
2009-08-30 00:51:52 +02:00
Michael Adam
f1b386a894 talloc: add script/abi_checks.sh. check for abi changes without gcc magic.
USAGE: abi_checks.sh LIBRARY_NAME header1 [header2 ...]

This creates symbol signature lists using the mksyms and mksigs scripts
and compares them with the checked in lists.

Michael
2009-08-30 00:51:51 +02:00
Michael Adam
4579c05462 talloc: add script to extract signatures from header files.
This produces output like the output gcc produces when
invoked with the -aux-info switch.

Run like this: cat talloc.h | ./script/mksigs.pl

This simple parser is probably too coarse to handle all possible
header files, but it does treat talloc.h correctly.

Michael
2009-08-30 00:51:51 +02:00
Michael Adam
e896f9188d talloc: add scripts to extract library symbols (exports file) from headers
Michael
2009-08-30 00:51:50 +02:00
Andrew Tridgell
0f98d539e2 note the semantic change in talloc_free from 2.0 2009-08-24 16:33:00 +10:00
Andrew Tridgell
f60f0077e4 fixed typo in talloc doc XML 2009-08-24 16:30:01 +10:00
Andrew Tridgell
798b3fbb53 updated XML source for talloc man page 2009-08-24 16:30:00 +10:00
Andrew Tridgell
e6da38c8b7 added talloc_set_log_* documentation 2009-08-24 16:30:00 +10:00
Andrew Tridgell
a0e2041836 updated talloc guide for recent API changes 2009-08-24 16:30:00 +10:00
Stefan Metzmacher
55dbe80d05 talloc: add --enable-talloc-compat1 to build a compat library for talloc 1.x.x
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
64e05779d2 talloc: update talloc.exports and talloc.signatures
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
6c9ace27c5 talloc: add defines and functions for TALLOC_MAJOR/MINOR_VERSION
We also use the major and minor versions in the TALLOC_MAGIC,
so that we can detect if two conflicting versions of talloc
are loaded in one process. In this case we use talloc_log() to
output a very useful debug message before we call
talloc_abort().

metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
9baacbbbdf talloc: change version to 2.0.0
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
5760edeeb6 talloc: remove ABI compat functions
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
8a90c8bc98 talloc: remove unused build dependecies to samba
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
ed384e8aac talloc/testsuite: use talloc_set_log_fn() and log to stdout
metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
e40f3144f2 talloc: add talloc_set_log_fn() and talloc_set_log_stderr()
So that the application can setup a log function to get ERROR
and WARNING messages.

metze
2009-08-24 16:29:58 +10:00
Stefan Metzmacher
ac8aeec824 talloc: let talloc_steal() only generate a warning if it's used with references
We have to many callers, which rely on that talloc_steal() never fails.

metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
84810d7182 talloc/testsuite: report __location__ of testsuite failures
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
f8559b8238 talloc/testsuite: add infrastructure to test aborts
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
13227f83b9 talloc/testsuite: reset the globals after each subtest
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
1fbc86c57a talloc: call return after abort, because an overloaded abort function might not exit
This will be useful in the testsuite,
where we could check if an abort would happen.

metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
2c664db749 talloc: report the size of reference handles as 0
metze
2009-08-24 16:29:57 +10:00
Stefan Metzmacher
d1895d2fee talloc: let talloc_total_blocks() and talloc_get_size() operate on the null_context
metze
2009-08-24 16:29:57 +10:00
Jelmer Vernooij
6768cfe624 DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.
Use py_talloc_reference in DCE/RPC code, fixes
					access to SAMR pipe.
2009-07-30 20:04:42 +02:00
Volker Lendecke
5742ed128d Fix some warnings 2009-07-04 12:54:22 +02:00
Simo Sorce
2738178d13 Restore ABI compatibility for talloc. 2009-07-03 08:45:29 -04:00
Stefan Metzmacher
f1dbd58a99 talloc: change TALLOC_MAGIC for version 2.0.0
metze
2009-07-02 23:18:42 +10:00
Andrew Tridgell
acfb01a8f6 change talloc to 2.0.0
This is needed to prevent samba3 and samba4 from using an ABI
incompatible system version of talloc

See ongoing discussion on the samba-technical mailing list
2009-07-02 15:19:40 +10:00
Andrew Tridgell
34d6d7cec8 fixed the talloc testsuite for the recent changes 2009-07-01 16:37:33 +10:00
Andrew Tridgell
3c2f4df555 a talloc_realloc() to zero size needs to use an unambiguous free 2009-07-01 16:37:33 +10:00
Andrew Tridgell
5fe1d8dc12 changes to remove the ambiguity in talloc_free() and talloc_steal()
These changes follow from the discussions on samba-technical. The
changes are in several parts, and stem from the inherent ambiguity
that was in talloc_free() and talloc_steal() when the pointer that is
being changes has more than one parent, via references.

The changes are:

 1) when you call talloc_free() on a pointer with more than one parent
 the free will fail, and talloc will log an error to stderr like this:

    ERROR: talloc_free with references at some/foo.c:123
	   reference at other/bar.c:201
	   reference at other/foobar.c:641
 
 2) Similarly, when you call talloc_steal() on a pointer with more
 than one parent, the steal will fail and talloc will log an error to
 stderr like this:

    ERROR: talloc_steal with references at some/foo.c:123
	   reference at other/bar.c:201

 3) A new function talloc_reparent() has been added to change a parent
 in a controlled fashion. You need to supply both the old parent and
 the new parent. It handles the case whether either the old parent was
 a normal parent or a reference

The use of stderr in the logging is ugly (and potentially dangerous),
and will be removed in a future patch. We'll need to add a debug
registration function to talloc.
2009-07-01 15:15:37 +10:00
Andrew Tridgell
956b5a0003 fixed use of reference in pytalloc
The previous code caused memory leaks, and also caused situations
where talloc_free could be called on pointers with multiple parents

The new approach is to have two functions:

  py_talloc_import : steals the pointer, so it becomes wholly owned by
                     the python object
  py_talloc_reference: uses a reference, so it is owned by both python
                     and C
2009-07-01 15:15:37 +10:00
Simo Sorce
ac1d311e9c fix release scripts to always git clean
This makes sure we do not include foreign object files or other
build byproducts by mistake.
2009-06-17 14:18:03 -04:00
Simo Sorce
e83f4b868b Add exports file and abi checker for talloc
This is a first attempt at exporting symbols only for public functions
We also provide a rudimentary ABI checker that tries to check that
function signatures are not changed by mistake.
Given our use of macros this is not an API checker.
It's all based on talloc.h contents and the gcc -aux-info option
2009-06-15 16:31:12 -04:00