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
|
- To: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Subject: Re: bug in simplify_shallow
- From: Karim Belabas <Karim.Belabas@u-bordeaux.fr>
- Date: Mon, 21 Aug 2023 14:19:51 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1692620383; c=relaxed/relaxed; bh=cWiRpFF03O+RSj8VSLjJi02LKXAu51BtjqEvD7Uoses=; h=Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; b=PhLC5YkD97Y+AoQpBEUld5LMcZcQPFUPnwP1CrjK2ctuhnoAf8nQsVGf/h2OSz+ZcJ7c2nDVsmQiN0zf3GHZ7b4DjIUUKZ8D/R4v/LzTB9KZn9kw22nYeRfzmxUVVdeWdu13h0Z1rtYnBOsy7XwrzJxj84PiQaBJbcCstD6FntUA9w8xUmHmMJ0UGtZSrPJiug70Cht0fH9kKVkHy1Mw0wzVhVmo/kZHyJe0U6guj5xp85lSWC59DYnqf/iAudk0XE1Lkn7r0PtuMvXIZHOnU5A8jQiSlkwTZTaK02f7yOWzE+5LKYkaFjlHmxn+PiN+U9cA1jW1hnmhywrAEH2IRyD9Xsjyxu//seE8MFIxD5ynekBViEWGPcgQpf8gTsGpVvI0eZXZkzva+nF/8r/PzJStYQXPHHdnQN2VR3mM+QxtM4mNQN5heNbjWRoAldmq98ykqs4EgXUUimt3ZYuZqrijjapxaYWhLAOMFV9Rv2iYpOliE87JyJUCkGxZFgUJDCMM49dX8x5+RxP5RqxasJPzvaNTMxwXRXVeZZa4pM0DmBnJbxfKAJogtQCHOSz/LhwasGJaXBEMmzKGfCZp8NKJKC+TsdC+tkzrB5bWWQVPPtGeOqwyzvaSdd/KwpGhi3PcRjja0PazooZI9qD7STMJfmxKrJtfVEM6H8YvoKg=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1692620383; cv=none; b=JEkxh1WSelCX7u3qGJ89XjQhkcQoCTwqJlHk3I7j7b18NjrsXWWcMw7UDP/zvn9a0Qg/KE0InQxdjKHqCZx7pqIzVpGcksc597Z3XHQ36hQk69ScGdxayvatTLUl1frbPS8jLRkfSfS6YBnS9E+0bA0esr+0ev1ZzMDA2/dKKq0dbaPMipUbo0cwhiVBi1BnVnQG+AM4O/Qq1HEOrQweWGrWwTWZf0p8mLm+bRWFtT8YburAGsTB0ImjlN1bUCuQVXjKw2e1g4aqB2n1yKiQfXt+3J7Z3v0Y+8KCD1SMs8hWg6abXeAWVZNAFKOHsD8ccs1Se+rp7lc5pKHnXh+j6L+E5FzhP8RjLQQ3IB2um15lz93n58KaepcQuxqlDFYKET2DLVxifqxP90Gb3UYML10cDD88nkmFqye5xN+EuGiKG+pbDu0kpbvfjBSB3zwVt7OIeTLP6rqxdzPJGLlO1pBDxEtEI9Z9umqRG3XVL/6OCWIksnYaSgBwRlOdBhjN1mYSWbe17WtY4RwsobIg9NsZg8Fw1CUYNdFgRXHMVOt3oDoyBALr5cH6FV6ykDQjGHFXcE72aGQjE6Aho+6I7uhD1boicb537xOjt/j7vRbVp8Ai5qW6LU2+OzdqvwNDeuEnJy37Bgoal4cL8BB6JhXJf3ob4/J0DUQ3DTx83F0=
- Authentication-results: smail; arc=none
- Cc: pari-dev@pari.math.u-bordeaux.fr
- Delivery-date: Mon, 21 Aug 2023 14:24:34 +0200
- In-reply-to: <963a7e6f-a427-4ba7-80d7-c185184eaca7@isolution.nl>
- Mail-followup-to: "Ruud H.G. van Tol" <rvtol@isolution.nl>, pari-dev@pari.math.u-bordeaux.fr
- References: <963a7e6f-a427-4ba7-80d7-c185184eaca7@isolution.nl>
* 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/