Skip to content

Commit

Permalink
apd: use gcassert to check that tmp big.Ints don't escape, add to CI
Browse files Browse the repository at this point in the history
This commit adds `gcassert:noescape` directives to bigint.go to verify
that the temporary big.Int values that are intended to be stack allocated
do not escape to the heap.

The commit then adds `gcassert` to CI.
  • Loading branch information
nvanbenschoten committed Jan 10, 2022
1 parent 3fb88ac commit cb81d05
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 56 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ jobs:
go get honnef.co/go/tools/cmd/staticcheck
staticcheck ./...
- name: 'GCAssert'
# Only run gcassert on latest versions of Go. Inlining heuristics change
# from version to version.
if: ${{ matrix.arch == 'x64' && matrix.go >= '1.16' }}
run: |
go get github.com/jordanlewis/gcassert/cmd/gcassert
gcassert ./...
- name: 'BuildTest for armv7'
if: ${{ matrix.arch == 'armv7' }}
env:
Expand Down
Loading

0 comments on commit cb81d05

Please sign in to comment.