> > [snip]
> > Yeah, I'm aware of that. I'd only want to suppress the "handle already
> > freed" messages, since they can only occur on ONE occasion with the Ruby
> > bindings and I know it's safe to ignore these. I think :))
> 
> not really - it knows its already freed because the first 4 bytes (int) contain
> a magic sequence. it's highly unlikely to find this sequence (it's not a common
> number) and so your chances of a mis-detection are like 1 in 4 billion.
> 
> the PROBLEM is that it needs to read these 4 bytes - what if the object is freed
> and libc has sbrk()'d the process size back down (not common - but possible and
> it does happen when enough of the heap frees up at the top). now those 4 bytes
> of magic check are not even within your processes memory space - so the CHECK
> will cause a segv (as would any other attempt to access the object). so in this
> case the app has not been saved. as i said - i didnt check pointer values to see
> if they are within memory space of the process. i actually dont know of a
> portable way of finding out what the memory space is (easily) and tracking it
> (easily). so in this case you'd segv, and the warnings are a sign that there is
> a possible segv there... :)

/me slaps forehead

Wow, I finally got what you meant, of couse you're right ;)
No idea why I thought this was safe o_O

-- 
Regards,
Tilman


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to