mudflap wrappers [patch]
Frank Ch. Eigler
fche@redhat.com
Mon Apr 28 19:53:00 GMT 2003
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030428/dc7136e3/attachment.sig>
More information about the Gcc
mailing list