Skip to content

crash in dump #370

Closed
Closed

Description

@user1095108
No description provided.

Activity

  1. user1095108 commented on Nov 26, 2016

    @user1095108
    Author

    operator<<

    #0 0x7fe9fadcdb0f in __dynamic_cast /build/gcc/src/gcc/libstdc++-v3/libsupc++/dyncast.cc:95
    #1 0x7fe9fae00d4c in std::locale::facet::_M_cow_shim(std::locale::id const*) const /build/gcc/src/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:792
    #2 0x7fe9fade1a2b in std::locale::_Impl::_M_install_facet(std::locale::id const*, std::locale::facet const*) /build/gcc/src/gcc/libstdc++-v3/src/c++98/locale.cc:384
    #3 0x4a9b26 in locale<nlohmann::(anonymous namespace)::DecimalSeparator> /usr/include/c++/6.2.1/bits/locale_classes.tcc:50
    #4 0x4ab19b in nlohmann::operator<<(std::ostream&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator> const&) json/src/json.hpp:5832
    

    dump()

    #0 0x7f7a88ec9b0f in __dynamic_cast /build/gcc/src/gcc/libstdc++-v3/libsupc++/dyncast.cc:95
    #1 0x7f7a88efcd4c in std::locale::facet::_M_cow_shim(std::locale::id const*) const /build/gcc/src/gcc/libstdc++-v3/src/c++11/cxx11-shim_facets.cc:792
    #2 0x7f7a88edda2b in std::locale::_Impl::_M_install_facet(std::locale::id const*, std::locale::facet const*) /build/gcc/src/gcc/libstdc++-v3/src/c++98/locale.cc:384
    #3 0x413026 in locale<nlohmann::(anonymous namespace)::DecimalSeparator> /usr/include/c++/6.2.1/bits/locale_classes.tcc:50
    #4 0x4262aa in nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator>::dump(int) const json/src/json.hpp:2204
    
  2. nlohmann commented on Nov 26, 2016

    @nlohmann
    Owner

    Can you give more information:

    • What input did you want to serialize?
    • What system (OS, compiler) are you using?
  3. user1095108 commented on Nov 26, 2016

    @user1095108
    Author

    Linux i7-2720QM 4.8.10-1-ARCH #1 SMP PREEMPT Mon Nov 21 11:55:43 CET 2016 x86_64 GNU/Linux

    It's just basic stuff, basically there's a crash with anything you do

    json j;
    j["something"] = 10;
    ::std::cout << j << ::std::endl;

    gcc version 6.2.1 20160830 (GCC)
    and c++1z flag

  4. user1095108 commented on Nov 26, 2016

    @user1095108
    Author

    ==3109==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ff28bfd3b10 bp 0x7ffdd5df5930 sp 0x7ffdd5df58c0 T0)

  5. TurpentineDistillery commented on Nov 26, 2016

    @TurpentineDistillery
    • Did you make the call from a destructor of a static object, by any chance?
    • Does using the code from the latest develop branch fix the issue for you? (it does not use DecimalSeparator, which appears in the stack trace)
  6. user1095108 commented on Nov 26, 2016

    @user1095108
    Author

    no, it's a plain vanilla test from main(), no static functions or destructors are involved.
    I'm using the latest and greatest json i.e. git checkout master

  7. user1095108 commented on Nov 26, 2016

    @user1095108
    Author

    wow, switching to the develop branch fixed the issue, way to go hehe. I'd think the develop branch would be the most unstable one :)

  8. nlohmann commented on Nov 26, 2016

    @nlohmann
    Owner

    There have been a lot of fixes lately, and master contains the previous release (which was thought to be stable ;)).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: invalidthe issue is not related to the library

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions