Wireshark-bugs: [Wireshark-bugs] [Bug 2453] segmentation fault with wslua script
Date: Wed, 2 Jul 2008 09:30:52 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2453


Balint Reczey <balint.reczey@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1757|review_for_checkin?         |
               Flag|                            |
Attachment #1757 is|0                           |1
           obsolete|                            |
   Attachment #1758|review_for_checkin?         |
               Flag|                            |
Attachment #1758 is|0                           |1
           obsolete|                            |
   Attachment #1951|                            |review_for_checkin?
               Flag|                            |




--- Comment #34 from Balint Reczey <balint.reczey@xxxxxxxxxxxx>  2008-07-02 09:30:50 PDT ---
Created an attachment (id=1951)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=1951)
fix based on the original "outstanding_stuff" handling

The patch fixes the problem by extending the original "outstanding stuff"
approach.

Now the pointer itself won't be NULLified, instead we track the pointers with
their expiry state in structs in the outstanding_stuff list.
The Lua objects refers to those structs instead of the actual pointers and
checks the expiry state of the pointers before accessing them.
The pointers are marked expired when the dissection of the frame is finished
and the allocated struct is freed by Lua's garbage collector.

If the garbage collector hits the struct when it holds a not expired pointer,
it marks it as expired (that means we don't have any object in Lua referring to
the pointer) and the struct will be freed at the end of the dissection of the
frame.


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.