1. 09 Sep, 2015 19 commits
  2. 08 Sep, 2015 14 commits
  3. 07 Sep, 2015 5 commits
  4. 06 Sep, 2015 1 commit
  5. 05 Sep, 2015 1 commit
    • Didier Spezia's avatar
      cmd/asm: fix another infinite loop in register list parser · 63e2bed0
      Didier Spezia authored
      The code parsing register lists involves an inner loop on
      each range defined by the lo,hi bounds. The condition on
      this loop (for lo<=hi) is fragile, because the bounds
      are unsigned 16 bits numbers.
      
      In some corner cases, the calculated upper bound is 2^16-1
      leading to an infinite loop.
      
      Parsing operand `[):[o-FP` results in:
      - an infinite loop for non ARM architectures
      - the generation of almost 2^16 errors for the ARM architecture
        (which are then ignored)
      
      This CL improves the code in 3 ways:
      - bail out early when parsing non R prefixed registers
      - make sure the register index is never negative
      - make sure the number of iterations is limited by the
        maximum size of the range (as a defensive measure).
      
      Fixes #12469
      
      Change-Id: Ib1e7e36fb8ad5a3a52c50fc6219d3cfe2b39cc34
      Reviewed-on: https://go-review.googlesource.com/14314Reviewed-by: default avatarRob Pike <r@golang.org>
      63e2bed0