Re: bug in simplify_shallow

Karim Belabas <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
* 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.