Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test GoThemis with Go 1.11~1.14 on CircleCI #595

Merged
merged 8 commits into from
Feb 27, 2020

Commits on Feb 26, 2020

  1. Run GoThemis tests across multiple Go versions

    We have found out that GoThemis seems to be broken with Go 1.11.
    Currently we test it versus whatever version is in the image. Instead,
    download latest supported versions of Go and test against them.
    
    We would like to make use of CircleCI caches -- because that's around
    500 MB that we're downloading -- but it turns out that it does not
    provide much of a speedup, so we simply pull tarballs from Google.
    Ideally, they should be a part of Docker image we use.
    ilammy committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    0650b32 View commit details
    Browse the repository at this point in the history
  2. Regression test for bytes.Buffer bug in go 1.11

    Add a test which expemplifies the bug in CGo 1.11 and earlier versions
    (at least since 1.6). It has been fixed in 1.12 but we still have to
    support some earlier versions.
    
    The bug causes the following test to panic. For some unknown reason
    it seems that only Secure Cell is susceptible to it, and only with
    "context" argument being used with bytes.Buffer vOv
    
    The panic itself is caused by a bug in CGo implementation which triggers
    a false positive in a pointer check, which erroenously verifies not only
    the context []byte buffer, but the entire bytes.Buffer object. Read more
    in the linked GitHub issue if you are interested.
    ilammy committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    f8bf6c1 View commit details
    Browse the repository at this point in the history
  3. Sanitize input buffers in go 1.11 and earlier

    We can work around the bug by copying each and every []byte slice that
    will get passed into C code via CGo. This removes association with
    bytes.Buffer and avoids any possible false positives in CGo.
    
    Since the bug has been fixed in Go 1.12, we copy the buffer only for
    earlier versions, making SanitizeBuffer() a no-op in later versions.
    ilammy committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    2914dd7 View commit details
    Browse the repository at this point in the history
  4. Changelog entry

    ilammy committed Feb 26, 2020
    Configuration menu
    Copy the full SHA
    5b2f623 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2020

  1. Simple benchmarks for Secure Message

    We've got curious about impact of copying on Secure Message performance
    so here are some primitive benchmarks to measure the impact (if any).
    ilammy committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    b8f5e21 View commit details
    Browse the repository at this point in the history
  2. Revert "Sanitize input buffers in go 1.11 and earlier"

    This reverts commit 2914dd7.
    ilammy committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    11cf7c7 View commit details
    Browse the repository at this point in the history
  3. Revert "Changelog entry"

    This reverts commit 5b2f623.
    ilammy committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    89c0246 View commit details
    Browse the repository at this point in the history
  4. Update regression test

    After discussion we have decided to not include a fix for this behavior
    because of miscellaneous complications. However, the test case is still
    there. Just update it so that it fails when our code unexpectedly panics
    but passes if the panic is raised for Go 1.11 and below.
    ilammy committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    5a7a89b View commit details
    Browse the repository at this point in the history