ScopedDebugInfoStack::getAll() allocates memory during signal handling

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ScopedDebugInfoStack::getAll() returns std::vector<std::string> by calling toString() for each scoped debug info in the stack.

      However, this function is mainly used in signal handler, which is problematic, because we might not be able to allocate memory when handling a signal.

      We should change signature of ScopedDebugInfoStack::getAll() and ScopedDebugInfoStack::Rec::toString(), so that they can return information without forcing an allocation.

      For example, we can use appendTo semantics and pass an ostream or bson obj builderĀ  variant that doesn't do heap allocations.

            Assignee:
            Unassigned
            Reporter:
            Ivan Fefer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: