Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 2453] segmentation fault with wslua script

Date: Tue, 15 Jul 2008 07:54:21 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2453





--- Comment #35 from Balint Reczey <balint.reczey@xxxxxxxxxxxx>  2008-07-15 07:54:18 PDT ---
Hi Luis,

Could you check the patch?
It would be great to have it in trunk and probably it could be included in
1.0.3, too.

Balint

(In reply to comment #34)
> Created an attachment (id=1951)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=1951) [details]
> 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.