#1107208 libruby3.1: crash with math on certain BigDecimal numbers (bug in std library version 3.1), solution is upstream BigDecimal v3.1.2

Package:
libruby3.1
Source:
libruby3.1
Description:
Libraries necessary to run Ruby 3.1
Submitter:
Henry House
Date:
2025-06-03 04:13:01 UTC
Severity:
normal
Tags:
#1107208#5
Date:
2025-06-03 04:00:19 UTC
From:
To:
Dear Maintainer,

There is a crash bug in Ruby 3.1's BigDecimal class of the standard library
that is triggered by math on certain numerical values, which to my
understanding is corrected in Ruby 3.2 and in this patch:

https://github.com/ruby/bigdecimal/commit/127a1b5a31c4290945035ec7e07bb7b185a81ee2 .

How to reproduce:

ruby -r bigdecimal -e "BigDecimal('1') / (BigDecimal('1') + 0.08)**19"

The result is program termination:

	$ ruby -r bigdecimal -e "BigDecimal('1') / (BigDecimal('1') + 0.08)**19"
	-e:1: [BUG] ERROR(VpDivd): space for remainder too small.
	ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]