Skip to content
Snippets Groups Projects
Commit d1111c8b authored by Timur Safin's avatar Timur Safin Committed by Vladimir Davydov
Browse files

debugger: gracefully handle nil values

Appeared that ASAN build could return nil values from child
process executed via popen. Which sporadically produces
error messages:

  not ok 1 ..console_debugger_session.test_interactive_debugger_session
  #   ...ntool/test/app-luatest/console_debugger_session_test.lua:11:
  # attempt to index local 's' (a nil value)
  #   stack traceback:

Due to used timeouts we are ok to receive nil at one of a loop
cycle - we simply repeat read to popen object. So handle this
case gracefully.

NO_DOC=bugfix
NO_CHANGELOG=internal
parent e10f40b9
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ local function normalize_path(s)
end
local function unescape(s)
return s:gsub('[\27\155][][()#;?%d]*[A-PRZcf-ntqry=><~]', '')
return s and s:gsub('[\27\155][][()#;?%d]*[A-PRZcf-ntqry=><~]', '') or ''
end
local function trim(s)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment