Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
cd840bf0
Commit
cd840bf0
authored
Nov 17, 2015
by
antirez
Browse files
Lua debugger: fix trace command infinite loop.
Thanks to Itamar Haber for bug report and test case to reproduce.
parent
848c92a3
Changes
1
Show whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
cd840bf0
...
...
@@ -2172,11 +2172,12 @@ void ldbTrace(lua_State *lua) {
while(lua_getstack(lua,level,&ar)) {
lua_getinfo(lua,"Snl",&ar);
if(strstr(ar.short_src,"user_script")
=
= NULL)
continue;
if(strstr(ar.short_src,"user_script")
!
= NULL)
{
ldbLog(sdscatprintf(sdsempty(),"%s %s:",
(level == 0) ? "In" : "From",
ar.name ? ar.name : "top level"));
ldbLogSourceLine(ar.currentline);
}
level++;
}
if (level == 0) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment