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

Fix cgo argument check panic for small slices from bytes.Buffer (and similar types) #57

Merged
merged 5 commits into from
Mar 24, 2016

Commits on Feb 24, 2016

  1. lmdb: take slice address in cgo calls to avoid panic

    Small amounts of data written from bytes.Buffer can trigger a panic
    during cgo argument checking because the pointer points inside the
    Buffer struct.
    
    This commit ensures that byte addressing expressions appear in the
    arguments to C calls to avoid confusing cgo.  This appears to have
    negative effects on benchmark times.  The -test.benchmem flag seems to
    indicate that extra allocations are occurring
    bmatsuo committed Feb 24, 2016
    Configuration menu
    Copy the full SHA
    40ebaca View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2016

  1. lmdb: typo

    bmatsuo committed Mar 8, 2016
    Configuration menu
    Copy the full SHA
    cd2e4bf View commit details
    Browse the repository at this point in the history
  2. lmdb: inline the effects instead of valBytes

    This saves passing a few unnecessary pointers, passing nil instead.
    This should speed up the cgo check by a small amount.
    
    There seems to be a small speed up from this.
    bmatsuo committed Mar 8, 2016
    Configuration menu
    Copy the full SHA
    78c6618 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2016

  1. Configuration menu
    Copy the full SHA
    a6fc9ed View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2016

  1. Configuration menu
    Copy the full SHA
    50ccdc0 View commit details
    Browse the repository at this point in the history