Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | idtree: fix right shift of signed ints, crash on large ids on AIX | Rusty Russell | 2010-10-06 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | Right-shifting signed integers in undefined; indeed it seems that on AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives 0, not 1 as we might expect. The obvious fix is to make id and oid unsigned: l (level count) is also logically unsigned. (Note: Samba doesn't generally get to ids > 1 billion, but ctdb does) Reported-by: Chris Cowan <cc@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@samba.org> Autobuild-Date: Wed Oct 6 08:31:09 UTC 2010 on sn-devel-104 | ||||
* | Since idtree assigns sequentially, it rarely reaches high numbers. | Rusty Russell | 2010-06-10 | 1 | -3/+5 |
| | | | | | | | | | But such numbers can be forced with idr_get_new_above(), and that reveals two bugs: 1) Crash in sub_remove() caused by pa array being too short. 2) Shift by more than 32 in _idr_find(), which is undefined, causing the "outside the current tree" optimization to misfire and return NULL. | ||||
* | lib/util: fallback to any id in idr_get_new_random() | Stefan Metzmacher | 2009-04-01 | 1 | -2/+6 |
| | | | | metze | ||||
* | lib/util: s/new/pn in idtree.c | Stefan Metzmacher | 2009-02-02 | 1 | -16/+16 |
| | | | | metze | ||||
* | Move lib/util from source4 to top-level libutil. | Jelmer Vernooij | 2008-10-11 | 1 | -0/+403 |
Conflicts: source4/Makefile |