[panda-users] OSI framework free_* callbacks

Brendan Dolan-Gavitt brendandg at gatech.edu
Tue Feb 3 13:43:04 EST 2015


I did this out of perhaps too much caution. The thought was that if
plugins were compiled at different times, they might end up relying on
different versions of libc, which could have changed the
implementation of malloc/free. Thus, it might not be safe to try to
free() memory that was malloc'd by another plugin. The basic idea is
described here:

http://blogs.msdn.com/b/oldnewthing/archive/2006/09/15/755966.aspx

However, under the assumption that plugins all get compiled at the
same time (and hence always linked to the same libc), we can probably
get away with doing the freeing inside of os_intro.c.

-Brendan

On Tue, Feb 3, 2015 at 1:15 PM, Manolis Stamatogiannakis
<mstamat at gmail.com> wrote:
> Hello,
>
> Is there any reason that the free_*() functions in
> panda_plugins/osi/os_intro.c are only placeholders and the actual
> functionality has to be implemented by the OS-specific plugins?
>
> There's nothing OS-specific in the data types defined in osi_types.h, so
> these functions could be easily implemented within os_intro.c.
>
> Thanks,
> Manolis
>
> _______________________________________________
> panda-users mailing list
> panda-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/panda-users
>


More information about the panda-users mailing list