[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 now available
- From: "Pierre Chapuis" <catwell@...>
- Date: Wed, 01 Jul 2020 18:57:20 +0200
On Wed, Jul 1, 2020, at 18:42, Roberto Ierusalimschy wrote:
> > Doing this prevents the crash (!)
> >
> > --- src/lobject.old.c 2020-07-01 16:35:34.525256170 +0200
> > +++ src/lobject.c 2020-07-01 16:34:38.293400900 +0200
> > @@ -346,6 +346,7 @@
> > if (ttisinteger(obj))
> > len = lua_integer2str(buff, MAXNUMBER2STR, ivalue(obj));
> > else {
> > + fprintf(stderr, "%p\n", buff);
> > len = lua_number2str(buff, MAXNUMBER2STR, fltvalue(obj));
> > if (buff[strspn(buff, "-0123456789")] == '\0') { /* looks like an int? */
> > buff[len++] = lua_getlocaledecpoint();
>
> If you add this print in 'addnum2buff' instead, does the crash also
> disapear?
No. It prints something (e.g. 0x7ffdb5514fb0) and then it crashes.