Re: KEXT/KAUTH, malloc-related crash, login only?!?
Re: KEXT/KAUTH, malloc-related crash, login only?!?
- Subject: Re: KEXT/KAUTH, malloc-related crash, login only?!?
- From: Terry Lambert <email@hidden>
- Date: Wed, 7 Mar 2007 04:40:39 -0800
On Mar 5, 2007, at 12:30 PM, Ondra Cada wrote:
struct file_change {
TAILQ_ENTRY(file_change) link;
char *name,*oldname; // malloc'd, to be released, oldname only
for RENAME
unsigned long long serial; // ID of this item
long pid; // caller process ID
};
In "full" version of course there's much more alloc'd for the names.
It, though, crashes the same when the name allocation is commented-
out.
How large was the limit you imposed?
Tried different values, the last one 200.
It might be important that, like Kauthorama does, when the limit is
reached I don't cease malloc'ing; instead, for each malloc I release
the oldest queued item. Essentially, the algorithm is
alloc_item
if (OK) {
alloc_and_fill_names
if (OK) {
if (limit_reached) dequeue_last
enqueue_item
}
}
How do you protect your queue against reentrancy by multiple threads
of control, resulting in corruption of the queue?
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden