HomeFreeBSD

The code creates a lambda function that takes by reference the core_id local

Description

The code creates a lambda function that takes by reference the core_id local
variable, and pass it to a thread that often executes after constructor has
exited causing per-core thread to use a corrupted core_id.

Depending on compiler and runtime execution (and whether executing over gdb),
the tool might segfault or have incorrect behavior.

This makes sure the lambda function takes copy of automatic variable in
enclosing environment.

Submitted upstream as https://github.com/opcm/pcm/pull/162

Submitted by: Loic Prylli
Sponsored by: Netflix, Inc
Differential Revision: https://reviews.freebsd.org/D21804

Details

Provenance
impAuthored on
Differential Revision
D21804: cherry-pick memory corruption bug fix from github
Parents
rP512985: databases/py-pglite: Update to 1.0.12
Branches
Unknown
Tags
Unknown