Skip to content

Memory leak due to calling backtrace_create_state multiple times #118

@Cogitri

Description

@Cogitri

Hello,

currently boost-stacktrace with the backtrace backend will call backtrace_create_state once for each thread. This creates a memory leak since each time a new thread is created, a new backtrace_state is allocated but it's never freed (and can't be since there's no backtrace_destroy_state). See e.g. https://patchwork.ozlabs.org/project/gcc/patch/3defaafeedc9fa6b42e61401d4c8c84e@starynkevitch.net/#1625428 for more discussion on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions