Skip to content

Segfault with test_logging #539

Description

@lgeretti

A segfault is issued with test_logging in macOS gcc under the following test:

  1. The nonblocking scheduler is used (default)
  2. A theme is enabled
  3. Custom keywords are added (two is better, where if one is added the issue sometimes does not appear)
  4. A line is printed on main

The segfault in code appears as soon as we try to add custom keywords to the default keywords map.

I fail to see the problem since the keywords code is straightforward, but it seems that enqueue_println gives problems while an immediate println from the main thread does not. The dequeuing thread would seem not to be the issue given all the efforts done in simplifying for debug. Despite the actual test using extra threads, it is not necessary to supply them to give rise to the error: a print on main suffices, hence the problem must be with the dequeuing thread somehow.

Lifetime of the nonblocking scheduler is not a problem, since the issue appears before destruction of the class. Also the terminal is not given control yet. Return of the test executable instead might be a factor, since a sleep at the bottom of the test is sufficient to avoid the issue (most of the times).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggccLimited to the GCC compilerioInput-output modulemacosLimited to the macOS platform

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions