Mail Archives: djgpp-workers/2003/04/22/08:44:03
Eli Zaretskii wrote:
> From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
> >
> > > What about my new method of installing hooks?
> >
> > I will defer to Eli and other developers on that call.
>
> As I said before, I don't mind. However, in the interests of bringing
> more people into this decision-making process, could you please post a
> short tutorial about what you suggest, i.e. a few examples of how
> hooks will be installed and uninstalled?
>
> Yes, I know it's probably buried somewhere in your zip file, but I,
> for one, don't have time to glean this information from there, and
> others might not have it as well. Posting that information in a
> concise form will allow more developers to make up their minds and
> perhaps even suggest improvements.
It's on my to-do list. In general, though, DJGPP is not Unix and
can never be Unix. In particular it doesn't have the memory
protections that Unix does, so I think extra care in providing
sensitive interfaces is needed. A unix hook would trap if set to
point to non-executable memory. Imagine someone writing:
gets((char *)&somehookptr);
or something equally bizaare.
BTW, the hook documentation says they are specific to DJGPP. My
proposal is not compliant with POSIX in the extra argument and
macros to malloc_debug only, all other variations are in things
marked as !posix and possibly "available on many unices".
Maybe, for compatibility, the malloc_debug should be as previously
documented, and I should add a function "FILE
*setmalloc_debug_dump(FILE *fp)". My gut tells me this is going
to be invaluable for holding before and after snapshots, etc.
For now the malloc_debug levels are going to remain as originally
documented.
--
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
- Raw text -