-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Description
Look at this test:
func SubVVTest(){
z:=nat(nil).make(2)
x:=nat([]Word{1})
y:=nat([]Word{2})
c1:=subVV(z,x,y)
c2:=subVV_g(z,x,y)
fmt.Println(c1)
fmt.Println(c2)
}
c1 and c2 will get different results. The reason is that the length of x, y, z is not checked in the assembly code. Some other functions in arith.go have similar problems.
Three solutions:
(1) Remove the length check of x and y in subVV.
(2) Add length check in arith_$GOARCH.s files, though efficiency will become lower.
(3) Remove assembly functions and let the compiler consider these things.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.