https://bugs.llvm.org/show_bug.cgi?id=52209

            Bug ID: 52209
           Summary: Adding char const * and std::string  with
                    -DLIBCPP_DEBUG yields segfault
           Product: libc++
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: e.fokken+lib...@posteo.de
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Created attachment 25371
  --> https://bugs.llvm.org/attachment.cgi?id=25371&action=edit
full stack trace of the segfault

Compiling the following with clang++ -DLIBCPP_DEBUG -stdlib=libc++

#include <iostream>

int main() {
  std::pair<bool, double> minimum_{true, 1};

  std::cerr << "instance is below minimum of " +
std::to_string(minimum_.second)
            << "\n";

  return 0;
}

and executing yields a segfault. g++ or clang++ with libstdc++ instead output
the expected:
"instance is below minimum of 1.000000"

I've added a full stack trace.


See also https://github.com/pboettch/json-schema-validator/issues/177
Hope it helps!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to