mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 15:28:28 -05:00
Gioacchino Mazzurco
b62b3ec54b
Fix crash on Android due to dangling reference
JSON API debug lambda returned a dangling reference on Android, fix by moving the scope of the returned object What made this a bit tricky to understand was the fact that it happened only on Android, while the code was formally incorrect for all platforms, and strangely caused a stack overflow due to two std lib functions (sentry and flush) calling each other ad infinitum +#23379 0x603cb2a8 in std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::flush (this=0x618e92bc) at /opt/android-ndk/sources/cxx-stl/llvm-libc++/include/ostream:949 +#23380 0x603cad08 in std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::sentry::sentry (this=0x618e9284, __os=...) at /opt/android-ndk/sources/cxx-stl/llvm-libc++/include/ostream:270 +#23381 0x603cb2a8 in std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::flush (this=0x618e92bc) at /opt/android-ndk/sources/cxx-stl/llvm-libc++/include/ostream:949 +#23382 0x603cad08 in std::__ndk1::basic_ostream<char, std::__ndk1::char_traits<char> >::sentry::sentry (this=0x618e9304, __os=...) at /opt/android-ndk/sources/cxx-stl/llvm-libc++/include/ostream:270 +#23383 0x603caa6c in std::__ndk1::__put_character_sequence<char, std::__ndk1::char_traits<char> > (__os=..., __str=0x61379a60 " user: ", __len=7) at /opt/android-ndk/sources/cxx-stl/llvm-libc++/include/ostream:726 +#23384 0x603caa30 in std::__ndk1::operator<< <std::__ndk1::char_traits<char> > (__os=..., __str=0x61379a60 " user: ") at /opt/android-ndk/sources/cxx-stl/llvm-libc++/include/ostream:869 +#23385 0x60522184 in t_RsLogger<(RsLoggerCategories)5>::operator<< <char [8]> (this=0x618e92bc, val=...) at ../../../../Development/rs-develop/libretroshare/src/util/rsdebug.h:53 +#23386 0x60bbe5ec in JsonApiServer::registerHandler(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::function<void (std::__ndk1::shared_ptr<restbed::Session>)> const&, bool)::$_259::operator()(std::__ndk1::shared_ptr<restbed::Session>, std::__ndk1::function<void (std::__ndk1::shared_ptr<restbed::Session>)> const&) const (this=0x617d8364, session=..., callback=...) at ../../../../Development/rs-develop/libretroshare/src/jsonapi/jsonapi.cpp:517
// SPDX-FileCopyrightText: Retroshare Team <contact@retroshare.cc> // SPDX-License-Identifier: CC-BY-SA-4.0 = RetroShare RetroShare is a decentralized, private, secure, cross-platform, communication toolkit. RetroShare provides file sharing, chat, messages, forums, channels and more. .Build Status |=============================================================================== |GNU/Linux, macOS, (via Travis CI) | image:https://travis-ci.org/RetroShare/RetroShare.svg?branch=master[link="https://travis-ci.org/RetroShare/RetroShare"] |Windows (via AppVeyor) | image:https://ci.appveyor.com/api/projects/status/github/RetroShare/RetroShare?svg=true[link="https://ci.appveyor.com/project/RetroShare58622/retroshare"] |=============================================================================== == Compilation Short of comprehensive and updated documentation on how to build RetroShare (for the many supported platforms it runs on), scripts and recipes are provided in the aim of creating packages for the supported platforms (and more) in the `build_scripts` directory of this repository. Those packaging receipts together with the continuous integration files `.travis.yml` and `appveyor.yml` are a good source of knowledge on how to compile RetroShare on different platforms. == Using RetroShare on a headless computer with web UI WARNING: This section is outdated need to be adapted to the new web UI The web UI needs to be enabled as a parameter option to the retroshare-service: [source,bash] -------- ./retroshare-nogui --webinterface 9090 --docroot /usr/share/retroshare/webui/ -------- The web UI is only accessible on localhost:9090. It is advised to keep it that way so that your RS cannot be controlled using an untrusted connection. To access your web UI from a distance, just open a SSH tunnel to it: [source,bash] -------- distant_machine:~/ > ssh rs_host -L 9090:localhost:9090 -N -------- "rs_host" is the machine running `retroshare-nogui`. Then on the distant machine, access your web UI on http://localhost:9090 (This can also be done from the RetroShare GUI.)
Description
RetroShare is a Free and Open Source cross-platform, Friend-2-Friend and secure decentralised communication platform.
Languages
C++
85.6%
C
7%
QMake
1.7%
HTML
1.4%
NSIS
1%
Other
3.1%