]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/obj/s390x: increase maximum number of loop iterations
authorMichael Munday <mike.munday@ibm.com>
Wed, 4 Jul 2018 15:43:19 +0000 (16:43 +0100)
committerMichael Munday <mike.munday@ibm.com>
Thu, 5 Jul 2018 07:21:50 +0000 (07:21 +0000)
The maximum number of 'spanz' iterations that the s390x assembler
performs to reach a fixed point for relative offsets was 10. This
turned out to be too aggressive for one example of auto-generated
fuzzing code. Increase the number of iterations by 10x to reduce
the likelihood that the limit will be hit again. This limit only
exists to help find bugs in the assembler.

master at tip does not fail with the example code in the issue, I
have therefore not submitted it as a test (it is also quite large).
I tested this change with the example code at the commit given and
it fixes the issue.

Fixes #25269.

Change-Id: I0e44948957a7faff51c7d27c0b7746ed6e2d47bb
Reviewed-on: https://go-review.googlesource.com/122235
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/internal/obj/s390x/asmz.go

index 52cfc0e1e6804b6c3a8e94ac1d4eec16c96512e6..ce3fe6af73cf0f9ddc46575f7b603d193ca7d128 100644 (file)
@@ -427,7 +427,7 @@ func spanz(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
        changed := true
        loop := 0
        for changed {
-               if loop > 10 {
+               if loop > 100 {
                        c.ctxt.Diag("stuck in spanz loop")
                        break
                }