[Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump
Sergey Kaplun
skaplun at tarantool.org
Wed Jul 1 11:25:44 MSK 2026
Sergey,
On 30.06.26, Sergey Kaplun via Tarantool-patches wrote:
> Hi, Sergey,
>
> Thanks for the review!
> See my answers below.
>
> On 30.06.26, Sergey Bronnikov wrote:
> > Hi, Sergey,
> >
> > thanks for the patch! LGTM with minor comments.
> >
> > Sergey
> >
> > On 6/25/26 23:29, Sergey Kaplun wrote:
> >
> >
> > <snipped>
> >
> > > +
> > > +
> > > +def ctype_repr(cts, id):
> > > + ctype = ctype_get(cts, id)
> > > + ctypestr = ''
> > > + qual = 0
> > > + ptrto = 0
> > > + while True:
> >
> > probably it should be somehow limited, with broken memory/coredump
> >
> > the loop may be an infinite
>
> The infinite loop here means the infinite ctypes chain, so it means
> infinite memory. I suppose this is not a possible case.
> And maybe that ctype_child() returns the same class.
> I don't want to add an artificial limit for it.
After some considerations I've removed the unreachable code (since the
loop has no break statement):
===================================================================
diff --git a/src/luajit_dbg.py b/src/luajit_dbg.py
index b1a7182b..80057a4e 100644
--- a/src/luajit_dbg.py
+++ b/src/luajit_dbg.py
@@ -2585,7 +2585,6 @@ def ctype_repr(cts, id):
ctypestr = '(' + ctypestr + ')'
ctypestr += '()'
ctype = ctype_child(cts, ctype)
- return 'NYI'
def dump_ctype(ct):
===================================================================
<snipped>
> --
> Best regards,
> Sergey Kaplun
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list