From 6146593e11ac972a9ad1557eee4213b2960397c3 Mon Sep 17 00:00:00 2001 From: jah Date: Fri, 20 Feb 2015 03:07:04 +0000 Subject: [PATCH] Fix the creation of the thread.info property. Update the patterns used to extract hex chars from the string representation of a coroutine. It seems the string has changed in Lua 5.3 from "0xAB..." to "thread: AB..."; this was before:- NSE: Starting http-feed M:nil against ... NSE: http-feed M:nil spawning new thread (thread: 02C63A78). NSE: Finished http-feed W:nil against ... this is now:- NSE: Starting http-feed M:02D6EAF0 against ... NSE: http-feed M:02D6EAF0 spawning new thread (thread: 02D6E640). NSE: Finished http-feed W:02D6E640 against ... --- nse_main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nse_main.lua b/nse_main.lua index 4ecaed8f5..591420261 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -467,7 +467,7 @@ do co = co, env = env, identifier = tostring(co), - info = format("%s M:%s", self.id, match(tostring(co), "0x(.*)")); + info = format("%s M:%s", self.id, match(tostring(co), "thread: (%x+)")); parent = nil, -- placeholder script = self, type = script_type, @@ -485,7 +485,7 @@ do args = pack(...), close_handlers = {}, co = co, - info = format("%s W:%s", self.id, match(tostring(co), "0x(.*)")); + info = format("%s W:%s", self.id, match(tostring(co), "thread: (%x+)")); parent = self, worker = true, };