File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed
llvm-context/src/polkavm/context/function/runtime Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ This is a development pre-release.
66
77Supported ` polkadot-sdk ` rev: ` 2509.0.0 `
88
9- ### Chnaged
9+ ### Changed
1010- Emulated EVM heap memory accesses of zero length are never out of bounds.
1111
12+ ### Fixed
13+ - An off-by-one bug cusing incorrect ` SDIV ` overflow semantics.
14+
1215## v0.4.1
1316
1417This is a development pre-release.
Original file line number Diff line number Diff line change 11{
22 "Baseline" : 914 ,
33 "Computation" : 2295 ,
4- "DivisionArithmetics" : 14510 ,
4+ "DivisionArithmetics" : 14496 ,
55 "ERC20" : 17482 ,
66 "Events" : 1674 ,
77 "FibonacciIterative" : 1490 ,
Original file line number Diff line number Diff line change @@ -169,6 +169,8 @@ fn signed_division() {
169169 ( minus_five, two) ,
170170 ( I256 :: MINUS_ONE , I256 :: MIN ) ,
171171 ( one, I256 :: ZERO ) ,
172+ ( I256 :: MIN , I256 :: MINUS_ONE ) ,
173+ ( I256 :: MIN + I256 :: ONE , I256 :: MINUS_ONE ) ,
172174 ] {
173175 actions. push ( Call {
174176 origin : TestAddress :: Alice ,
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ impl RuntimeFunction for SignedDivision {
9292 "max_uint" ,
9393 ) ?;
9494 let is_operand_1_overflow = context. builder ( ) . build_int_compare (
95- inkwell:: IntPredicate :: EQ ,
95+ inkwell:: IntPredicate :: SLT ,
9696 operand_1,
9797 context. builder ( ) . build_int_neg ( max_uint, "min_uint" ) ?,
9898 "is_operand_1_overflow" ,
You can’t perform that action at this time.
0 commit comments