1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-16 20:23:50 +03:00
Commit Graph

33 Commits

Author SHA1 Message Date
Stefan Metzmacher
b787259365 r18096: try to make tcc happy and don't the same struct names in a global and
a local scope

metze
2007-10-10 14:17:16 -05:00
Stefan Metzmacher
c60deff667 r18064: merge from samba3
metze
2007-10-10 14:17:10 -05:00
Volker Lendecke
cd495d8931 r18027: Fix some 64-bit warnings 2007-10-10 14:17:04 -05:00
Stefan Metzmacher
d1dd3df5e4 r17958: as talloc_init() enabled null tracking, we should avoid to use it
in smbtorture, and in the LOCAL-TALLOC we should reset the null tracking

also make bin/smbtorture //url/foo LOCAL-TALLOC LOCAL-TALLOC possible

metze
2007-10-10 14:16:57 -05:00
Stefan Metzmacher
ff8d044c2e r17952: merge changes from samba3
metze
2007-10-10 14:16:56 -05:00
Stefan Metzmacher
972a84f220 r17905: fix c++ warnings
metze
2007-10-10 14:16:53 -05:00
Stefan Metzmacher
bfca83c91e r17886: add talloc_ptrtype() and talloc_array_ptrtype(),
see the manpage what they do:-)

metze
2007-10-10 14:16:51 -05:00
Stefan Metzmacher
bb79542edb r17883: check if talloc_asprintf() works correct
metze
2007-10-10 14:16:50 -05:00
Stefan Metzmacher
669d1e5f92 r17712: fix compiler warning
metze
2007-10-10 14:16:29 -05:00
Stefan Metzmacher
3be930b81d r17413: add a new case for the this:
top->level1->level2->level3

level3 has a deny destructor
talloc_free(level1)

result: top->level3

metze
2007-10-10 14:15:22 -05:00
Stefan Metzmacher
0559222b62 r17061: - remove the currect talloc chunk from it's parent before freeing the children
this fixes an endless loop bug!
- reenable the test for this

should I merge this to samba3?

metze
2007-10-10 14:10:09 -05:00
Stefan Metzmacher
3db6bd8715 r16447: print the result of talloc_set_parent()
trying to find the bug on HPUX

metze
2007-10-10 14:09:15 -05:00
Stefan Metzmacher
972634b202 r16445: print out values
metze
2007-10-10 14:09:15 -05:00
Stefan Metzmacher
f3cd971ab7 r16442: if we want to use CHECK_SIZE(NULL, 3)
we need null tracking, so enable it explicit before running any tests

metze
2007-10-10 14:09:14 -05:00
Andrew Tridgell
babbff5f77 r15852: patch from Rusty to make talloc_set_destructor() and talloc_steal()
type safe. This only works on recent gcc versions. With other
compilers it reverts to a non-typesafe cast

The patch also ensures that talloc_free() does not change error on
systems where free() can change errno
2007-10-10 14:08:32 -05:00
Andrew Tridgell
70531dcaee r15824: fixed a subtle talloc bug to do with memory context loops. When you
have a structure that references one of its parents, and a parent of
that parent is freed, then the whole structure should be freed, not
just the reference.

this was found by the change notify code, as a side effect of fixing
the memory leak yesterday
2007-10-10 14:08:28 -05:00
Jelmer Vernooij
3c7a5ce291 r14720: Add torture_context argument to all torture tests 2007-10-10 13:59:13 -05:00
Andrew Tridgell
ed90975bf5 r11984: LGPL on header and testsuite as well 2007-10-10 13:46:55 -05:00
Andrew Tridgell
563058e78b r8032: added loop detection into talloc. Robert Collins found a way to make a
memory loop with talloc_unlink(), so now we detect it and handle it
2007-10-10 13:19:00 -05:00
Andrew Tridgell
c8a274c873 r6808: - test for gcov not needed
- samba malloc wrapper avoidance not needed now we don't use includes.h

- make testsuite work when BOOL, True, False already defined
2007-10-10 13:16:46 -05:00
Jelmer Vernooij
3541ebe31b r6807: Fix in-tree build of talloc testsuite 2007-10-10 13:16:46 -05:00
Jelmer Vernooij
c2ce09d380 r6804: Add config.h for talloc (and use it) 2007-10-10 13:16:45 -05:00
Volker Lendecke
777c489cad r6660: Sorry for the spam... I think now I've got a version that should compile on
trunk, 3_0 and 4_0.

Volker
2007-10-10 13:16:32 -05:00
Stefan Metzmacher
d8aeb69ea8 r5142: fix compiler warning
metze
2007-10-10 13:09:27 -05:00
Andrew Tridgell
c283e1a3ef r4790: added type checking helper macros in talloc. These take advantage of
the type names that talloc already keeps around for pointers, and
allows the user to type check void* private pointers. It can also be
used to implement polymorphism in C, as I'm sure someone would have
pointed out to me sooner or later :-)
2007-10-10 13:08:55 -05:00
Andrew Tridgell
4ec47cc108 r4711: - deprecate talloc_destroy()
- expanded the talloc_realloc() test a little (I was concerned about a
  possible bug, which turned out to be an illusion)

- don't enable gcov by default in Makefile.talloc
2007-10-10 13:08:46 -05:00
Andrew Tridgell
2fe0e2528f r4593: don't use the _p function in the testsuite, as when built standalone it doesn't
use TALLOC_DEPRECATED
2007-10-10 13:08:30 -05:00
Andrew Tridgell
1177200dd9 r4592: fixed typo from talloc testsuite fixup for the new syntax 2007-10-10 13:08:30 -05:00
Andrew Tridgell
6e7754abd0 r4591: - converted the other _p talloc functions to not need _p
- added #if TALLOC_DEPRECATED around the _p functions

- fixes the code that broke from the above

while doing this I fixed quite a number of places that were
incorrectly using the non type-safe talloc functions to use the type
safe ones. Some were even doing multiplies for array allocation, which
is potentially unsafe.
2007-10-10 13:08:30 -05:00
Andrew Tridgell
2011bbeb84 r4550: talloc() is now typesafe. It is exactly equivalent to the old talloc_p() macro. Use
talloc_size() if you want the old behaviour.

I have kept talloc_p() as an alias for now. Once we change all calls
to be plain talloc() then we can remove it.
2007-10-10 13:08:26 -05:00
Andrew Tridgell
89b74b5354 r4549: got rid of a lot more uses of plain talloc(), instead using
talloc_size() or talloc_array_p() where appropriate.

also fixed a memory leak in pvfs_copy_file() (failed to free a memory
context)
2007-10-10 13:08:25 -05:00
Andrew Tridgell
e6c81d7c9f r4547: - added talloc_new(ctx) macro that is a neater form of the common talloc(ctx, 0) call.
- cleaned up some talloc usage in various files

I'd like to get to the point that we have no calls to talloc(), at
which point we will rename talloc_p() to talloc(), to encourage
everyone to use the typesafe functions.
2007-10-10 13:08:20 -05:00
Andrew Tridgell
98b5f73c1b r4473: - moved talloc into its own lib/talloc/ area
- added gcov flags to Makefile.talloc

- expanded talloc testsuite to add a test for realloc with a child ptr

- fixed a bug in talloc_realloc() with realloc of a ptr that has child ptrs
2007-10-10 13:07:55 -05:00