-
Notifications
You must be signed in to change notification settings - Fork 143
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
Commits on Feb 26, 2020
-
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.
Configuration menu - View commit details
-
Copy full SHA for 0650b32 - Browse repository at this point
Copy the full SHA 0650b32View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for f8bf6c1 - Browse repository at this point
Copy the full SHA f8bf6c1View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 2914dd7 - Browse repository at this point
Copy the full SHA 2914dd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b2f623 - Browse repository at this point
Copy the full SHA 5b2f623View commit details
Commits on Feb 27, 2020
-
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).
Configuration menu - View commit details
-
Copy full SHA for b8f5e21 - Browse repository at this point
Copy the full SHA b8f5e21View commit details -
Revert "Sanitize input buffers in go 1.11 and earlier"
This reverts commit 2914dd7.
Configuration menu - View commit details
-
Copy full SHA for 11cf7c7 - Browse repository at this point
Copy the full SHA 11cf7c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89c0246 - Browse repository at this point
Copy the full SHA 89c0246View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 5a7a89b - Browse repository at this point
Copy the full SHA 5a7a89bView commit details