Skip to content

Json::parseFromStream crash, not thread safety? #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
coolcode-ws opened this issue Jan 8, 2020 · 1 comment
Closed

Json::parseFromStream crash, not thread safety? #1130

coolcode-ws opened this issue Jan 8, 2020 · 1 comment

Comments

@coolcode-ws
Copy link

Program terminated with signal 6, Aborted.
#0 0x00007fd0acab71f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0 0x00007fd0acab71f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fd0acab88e8 in __GI_abort () at abort.c:90
#2 0x00007fd0acaf6f47 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7fd0acc03628 "*** Error in `%s': %s: 0x%s *\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
#3 0x00007fd0acafe619 in malloc_printerr (ar_ptr=0x7fad64000020, ptr=, str=0x7fd0acc036c0 "free(): invalid next size (normal)", action=3) at malloc.c:5023
#4 _int_free (av=0x7fad64000020, p=, have_lock=0) at malloc.c:3845
#5 0x0000000000bed6f4 in std::_Deque_base<Json::OurReader::ErrorInfo, std::allocatorJson::OurReader::ErrorInfo >::~_Deque_base() ()
#6 0x0000000000bee2a0 in Json::OurCharReader::~OurCharReader() ()
#7 0x0000000000bed0f4 in Json::parseFromStream(Json::CharReader::Factory const&, std::istream&, Json::Value
, std::string
) ()
#8 0x000000000056d717 in chain::parse_response_sm (results=..., sm4_key=...) at p2p/spv/json_serializer.cpp:877

@dota17
Copy link
Member

dota17 commented Jan 13, 2020

CharReaders and StreamWriters are not thread-safe, but they are re-usable.

@dota17 dota17 closed this as completed Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants