This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mudflap wrappers [patch]


Hi -


On Sat, Apr 26, 2003 at 07:43:18PM +1000, Eyal Lebedinsky wrote:
> [...]
> opendir() and friends use 'DIR *' which is never a completed
> 	type, so how should I check this pointer? I use a size
> 	of zero - is this "The Right Way"?

I suspect the right approach will be a combination of autoconf
(detecting whether the DIR object's size might be yanked out
of system headers, then stick with that), and a conservative
backup (using size 1).


> shmdt() does not supply the size of the object, which is needed
> 	for the check and the unreg. Again I use zero size, can
> 	I do better?

Sure - you could use the same shmctl() trick you use in shmat().


> In general, when a new object shows up I check it with WRITE mode
> to ensure mf knows it was written to. Any problem with this?  [...]

For opaque system objects like FILE, DIR, I wouldn't bother with
such artificial check calls.  If no directly instrumented read/write
pointers operations are made on them, it doesn't matter whether
libmudflap knows their written-ness.


- FChE

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]