Karim Belabas on Mon, 21 Aug 2023 14:24:34 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: bug in simplify_shallow


* Ruud H.G. van Tol [2023-08-21 13:07]:
> 
> ? b8(d)=for(i=1,#d,d[i]=fromdigits(digits(d[i],8))); strjoin(d,"9");
> 
> ? b8([5])
>   ***   bug in simplify_shallow, type unknown, please report.
> 
> -- Ruud
> 
> Works OK:
> ? b8e(d)=for(i=1,#d,d[i]=fromdigits(digits(d[i],8))); eval(strjoin(d,"9"));

Thanks for your report !

A memory corruption in strjoin in a corner case (input has a single
argument, which is not a character string). We ended up returning freed
memory (more precisely pointer to stack data which is going to be
overwritten).

Fixed in master.

Cheers,

    K.B.
-- 
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/