Date: Wed, 10 Jun 1998 22:04:24 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: wjw@IAEhv.nl Cc: hackers@FreeBSD.ORG Subject: Re: debugging memory allocation in -stable Message-ID: <199806102204.PAA14301@usr01.primenet.com> In-Reply-To: <199806102001.WAA03724@surf.IAEhv.nl> from "Willem Jan Withagen" at Jun 10, 98 10:01:41 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Working on some stuff with variant links, crashed became my life. But I > have some code partially working. Only a few symbolic links later, I get a > crash due to having already free'ed some buffer. > > I'm pretty shure I have to release this buffer in my code, but know I'd like > to know where this buffer was malloced in the first place. > How do I figure this out? I have not had a chance yet to look at your code. I *will* look at the code in the near future. From a cursory examination, I have: I think you are not treating symbol expansion as being exactly the same as link expansion. See the "Check for symbolic link" case in namei() in vfs_lookup.c. It is exactly analogous to the "readlink" case. In most cases, an inline expansion is possible. This is my opinion from the code integration location. IMO, you should be wedging the "$" into the cn_hash calaculation, which has to do the traversal anyway (making it two compares -- nearly free). You may want to look at the HASBUF/SAVESTART flags while you are there; after a manipulation, these should probably be reset on the allocated version, and tested for the FREE. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806102204.PAA14301>