Commit Graph

320 Commits (35d2771cd34253c34df8f0b7bc76c7252159c568)

Author SHA1 Message Date
Andrey Lihatskiy 201f83472c Merge branch 'master' into DRTVWR-543-maint 2022-02-28 21:55:28 +02:00
Bennett Goble f729cfc33f SL-15742: Convert build scripts to Python 3
This changeset makes it possible to build the Second Life viewer using
Python 3. It is designed to be used with an equivalent Autobuild branch
so that a developer can compile without needing Python 2 on their
machine.

Breaking change: Python 2 support ending

Rather than supporting two versions of Python, including one that was
discontinued at the beginning of the year, this branch focuses on
pouring future effort into Python 3 only. As a result, scripts do not
need to be backwards compatible. This means that build environments,
be they on personal computers and on build agents, need to have a
compatible interpreter.

Notes

- SLVersionChecker will still use Python 2 on macOS
- Fixed the message template url used by template_verifier.py
2021-12-10 14:42:49 -08:00
Andrey Lihatskiy 12d68c3f6c Merge branch 'master' into DRTVWR-543-maint
# Conflicts:
#	autobuild.xml
#	indra/CMakeLists.txt
#	indra/llcommon/CMakeLists.txt
#	indra/newview/CMakeLists.txt
#	indra/newview/llappviewerwin32.h
2021-10-22 16:29:58 +03:00
Andrey Kleshchev a212a862b4 SL-15211 SL-14541 Update OpenSSL library
Moving a copy of OpenSSL 1.1.1 to D543 from D520 to have less conflicts with zlib-ng integration later
2021-09-08 23:18:07 +03:00
Andrey Kleshchev 5af8f15a05 SL-14541 Replace zlib with zlib-ng 2021-09-08 23:18:07 +03:00
Andrey Kleshchev 6e200800ed SL-14541 removed breakpad, win_crash_logger
# Conflicts:
#	autobuild.xml
#	indra/CMakeLists.txt
#	indra/newview/CMakeLists.txt
#	indra/newview/llappviewerwin32.h
#	indra/win_crash_logger/llcrashloggerwindows.cpp
Cherry picked from DRTVWR-520
2021-09-08 22:38:46 +03:00
Mnikolenko ProductEngine 8c7db0ad6c SL-15902 Cleanup gSecAPIHandler 2021-09-03 22:21:29 +03:00
Andrey Lihatskiy 97f09de4fc Merge branch 'master' into DRTVWR-520-apple-notarization
# Conflicts:
#	autobuild.xml
#	build.sh
#	indra/CMakeLists.txt
#	indra/newview/CMakeLists.txt
#	indra/newview/llappviewermacosx.cpp
#	indra/newview/llappviewerwin32.h
#	indra/newview/viewer_manifest.py
#	indra/win_crash_logger/llcrashloggerwindows.cpp
2021-08-12 23:13:12 +03:00
Andrey Kleshchev 823f97ac59 SL-15272 Bugsplat crashes at condition wait()
Made sure all waits will be triggered, won't loop back and that in case of http queue it had some time to trigger
2021-06-03 21:31:30 +03:00
Andrey Kleshchev c518a8cf0f SL-15211 Remove unsused functions
CRYPTO_set_id_callback and CRYPTO_set_locking_callback are no-op in ssl 1.1.x
2021-05-27 12:56:35 +03:00
Andrey Lihatskiy 2922c59316 Merge branch 'sl-10297' into DRTVWR-516-maint 2021-05-21 20:31:53 +03:00
Nat Goodspeed fd1545197a SL-10297: Merge branch 'sl-10297-oz' into sl-10297.
Bring in Oz's tweaks to the way BugSplat is engaged and tested, plus a few
other miscellaneous goodies.
2021-05-12 13:56:19 -04:00
Andrey Lihatskiy 789be6b933 Merge branch 'master' into DRTVWR-520-apple-notarization 2021-04-30 03:05:19 +03:00
Andrey Kleshchev 3f31901640 Merge master (DRTVWR-515) into DRTVWR-516-maint
# Conflicts:
#	autobuild.xml
#	doc/contributions.txt
#	indra/llcommon/llcoros.cpp
#	indra/llmessage/llcoproceduremanager.cpp
#	indra/newview/llfloaterfixedenvironment.cpp
#	indra/newview/llfloaterimsessiontab.cpp
2021-04-29 21:00:25 +03:00
Andrey Lihatskiy 2febf90744 SL-14541 follow-up xcode buildfix 2021-03-17 08:53:20 +02:00
Andrey Kleshchev 609a26b59a Merge branch 'master' of https://bitbucket.org/lindenlab/viewer/src/master into DRTVWR-515-maint
# Conflicts:
#	autobuild.xml (llca)
#	indra/llwindow/llwindow.h (SL-13507 vs SL-5894)
#	indra/newview/llscenemonitor.cpp (SL-14422)
#	indra/newview/llvovolume.cpp (SL-12069)
2021-02-01 22:28:15 +02:00
Andrey Lihatskiy cd831c4228 Merge branch 'master' into DRTVWR-516-maint 2021-02-01 22:11:04 +02:00
Andrey Kleshchev bee13995e4 SL-14597 Missed libraries for http test 2021-01-18 12:48:12 +02:00
Andrey Lihatskiy 0303dd8179 Merge branch 'master' into DRTVWR-513-maint
# Conflicts:
#	autobuild.xml
#	indra/llui/llfolderviewmodel.h
#	indra/newview/lltexturecache.cpp
#	indra/newview/llviewermenu.h
#	indra/newview/skins/default/xui/en/menu_wearable_list_item.xml
2020-11-11 22:14:24 +02:00
Andrey Lihatskiy 83822fd199 Merge branch 'master' into DRTVWR-516-maint
# Conflicts:
#	indra/newview/llvocache.cpp
2020-09-28 22:39:06 +03:00
Andrey Lihatskiy 1d458de949 Merge branch 'master' into DRTVWR-515-maint
# Conflicts:
#	indra/newview/llpanelprimmediacontrols.cpp
2020-09-28 22:29:19 +03:00
Andrey Lihatskiy 32cb17e3bb Merge branch 'master' into DRTVWR-513-maint
# Conflicts:
#	indra/newview/llgroupmgr.cpp
2020-09-28 22:24:12 +03:00
Andrey Kleshchev 738a651efa Fix line endings 2020-09-23 17:53:31 +03:00
Andrey Kleshchev 6936736d17 Revert SL-13927 commit 8c8eac256b.
Got into D503 by accident
2020-09-11 21:00:20 +03:00
Andrey Kleshchev 8c8eac256b SL-13927 Turn SSL verification On for all SL services in viewer 2020-09-11 16:32:19 +03:00
Andrey Kleshchev 8594be3b9a SL-13927 Turn SSL verification On for all SL services in viewer 2020-09-11 16:31:15 +03:00
Andrey Kleshchev 81553d1b8c SL-13919 SSL verification should take mVerifyPeer flag into account 2020-09-09 22:09:39 +03:00
Oz Linden a9d271c5a2 SL-10297 merged 6.4.7 2020-08-24 13:11:07 -04:00
Andrey Lihatskiy 9406b757a3 Merge branch 'DRTVWR-501-maint' into DRTVWR-503-maint
# Conflicts:
#	indra/cmake/DirectX.cmake
#	indra/newview/llviewerparcelmedia.cpp
#	indra/newview/viewer_manifest.py
2020-08-11 01:34:13 +03:00
Andrey Lihatskiy ae48c7c8b3 Merge branch 'master' into DRTVWR-513-maint
# Conflicts:
#	indra/llcommon/llerror.cpp
#	indra/newview/llappviewerwin32.cpp
#	indra/newview/llimprocessing.cpp
#	indra/newview/llviewerjoystick.cpp
2020-07-21 11:54:11 +03:00
Oz Linden 86009f885e SL-10297: merge up to master at 6.4.3 2020-06-15 15:29:04 -04:00
Andrey Kleshchev 71f6b139f8 SL-13348 Thread crashing singleton #1 2020-05-29 20:10:55 +03:00
Nat Goodspeed ca6f092929 DRTVWR-476: Merge branch 'master' of lindenlab/viewer into DRTVWR-476-boost-1.72 2020-05-06 16:06:26 -04:00
Nat Goodspeed 91cca79c14 DRTVWR-476: #include "boost/noncopyable.hpp" in another consumer. 2020-04-09 08:06:46 -04:00
Nat Goodspeed c7cf322be5 DRTVWR-476: #include "boost/noncopyable.hpp" in httpcommon.h.
Apparently, in previous Boost versions, boost::noncopyable was sneaking into
the namespace via other headers. Now the compiler complains about its absence
without an explicit #include.
2020-04-09 06:49:49 -04:00
Nat Goodspeed 4174bb3640 DRTVWR-476: Disable test_httprequest.hpp on Mac Release builds.
For reasons not yet diagnosed, specifically in Mac Release builds, the tests
in test_httprequest.hpp consistently crash with a backtrace suggesting that
the worker thread is calling LLCore::HttpLibcurl::completeRequest() after the
foreground thread calls HttpRequest::destroyService().

Weirdly, even executing a tut::skip() call in every test<n>() function up to
the point of the crash does not eliminate the crash.
2020-03-25 18:44:04 -04:00
Nat Goodspeed 2902f23a41 DRTVWR-476: Remove special llcorehttp test memory manager.
NickyD discovered that the substitute default allocator used for llcorehttp
tests was returning badly-aligned storage, which caused access violations on
alignment-sensitive data such as std::atomic. Thanks Nicky!!

Moreover, the llcorehttp test assertions regarding memory usage, well-
intentioned though they are, have been causing us trouble for years. Many have
already been disabled.

The problem is that use of test_allocator.h affected *everything* defined with
that header file's declarations visible. That inevitably included specific
functions in other subsystems. Those functions then (unintentionally) consumed
the special allocator, throwing off the memory tracking and making certain
memory-related assertions consistently fail.

This is a particular, observable bad effect of One Definition Rule violations.
Within a given program, C++ allows multiple definitions for the same entity,
but requires that all such definitions be the same. Partial visibility of the
global operator new() and operator delete() overrides meant that some
definitions of certain entities used the default global allocator, some used
llcorehttp's. There may have been other, more subtle bad effects of these ODR
violations.

If one wanted to reimplement verification of the memory consumption of
llcorehttp classes:

* Each llcorehttp class (for which memory tracking was desired) should declare
  class-specific operator new() and operator delete() methods. Naturally,
  these would all consume a central llcorehttp-specific allocator, but that
  allocator should *not* be named global operator new().
* Presumably that would require runtime indirection to allow using the default
  allocator in production while substituting the special allocator for tests.
* Recording and verifying the memory consumption in each test should be
  performed in the test-object constructor and destructor, rather than being
  sprinkled throughout the test<n>() methods.
* With that mechanism in place, the test object should provide methods to
  adjust (or entirely disable) memory verification for a particular test.
* The test object should also provide a "yes, we're still consuming llcorehttp
  memory" method to be used for spot checks in the middle of tests -- instead
  of sprinkling in explicit comparisons as before.
* In fact, the llcorehttp test object in each test_*.hpp file should be
  derived from a central llcorehttp test-object base class providing those
  methods.
2020-03-25 18:44:04 -04:00
Nat Goodspeed c56601bc22 DRTVWR-476: Add LLCOREHTTP_TESTS CMake var, OFF by default on Mac.
Hopefully this is temporary until we solve the problem of crashy llcorehttp
test executable on Mac.
2020-03-25 18:44:04 -04:00
Anchor ca66cea70d [DRTVWR-476] - revert 2020-03-25 18:40:44 -04:00
Anchor cc230eef30 [DRTVWR-476] - disable llcorehttp test on mac 2020-03-25 18:40:44 -04:00
Anchor 201ff48cb1 [DRTVWR-476] - temporarily disable llcorehttptest on mac 2020-03-25 18:40:44 -04:00
Anchor b5bb0794f0 [DRTVWR-476] - fix linking 2020-03-25 18:39:20 -04:00
Nat Goodspeed 663b9ff6af DRTVWR-476: pthread_self() also needs CRYPTO_THREADID_set_pointer() 2020-03-25 16:12:46 -04:00
Nat Goodspeed 25a658440d DRTVWR-476: Remove throw(T) from operator new(), operator delete().
llcorehttp's test_allocator.{h,cpp} overrides global operator new(), operator
new[](), operator delete() and operator delete[](). The two operator new()
functions used to be declared with throw(std::bad_alloc). Worse, for VS 2013
and previous, we needed _THROW0() and _THROW1(std::bad_alloc) instead,
requiring #if logic.

But with dynamic throw declarations deprecated, we must actually remove those.
That obviates the THROW_BAD_ALLOC() / THROW_NOTHING() workarounds in
test_allocator.cpp.
2020-03-25 16:12:46 -04:00
Nat Goodspeed 3753dbd5ed DRTVWR-476: Use OpenSSL API suitable for 64-bit pointers.
In three different places we use the same pattern: an ssl_thread_id_callback()
function (a static member of LLCrashLogger, in that case) that used to be
passed to CRYPTO_set_id_callback() and therefore returned an unsigned long
representing the ID of the current thread.

But GetCurrentThread() is a HANDLE, an alias for a pointer, and you can't
uniquely cram a 64-bit pointer into an unsigned long.

Fortunately OpenSSL has a more modern API for retrieving thread ID. Pass
each ssl_thread_id_callback() function to CRYPTO_THREADID_set_callback()
instead, converting it to accept CRYPTO_THREADID* and call
CRYPTO_THREADID_set_pointer() or CRYPTO_THREADID_set_numeric() as appropriate().
2020-03-25 16:12:46 -04:00
Nat Goodspeed 5e7df752a6 DRTVWR-494: Use std:🧵:id for LLThread::currentID().
LLThread::currentID() used to return a U32, a distinct unsigned value
incremented by explicitly constructing LLThread or by calling LLThread::
registerThreadID() early in a thread launched by other means. The latter
imposed an unobvious requirement on new code based on std::thread. Using
std:🧵:id instead delegates to the compiler/library the problem of
distinguishing threads launched by any means.

Change lots of explicit U32 declarations. Introduce LLThread::id_t typedef to
avoid having to run around fixing uses again if we later revisit this decision.

LLMutex, which stores an LLThread::id_t, wants a distinguished value meaning
NO_THREAD, and had an enum with that name. But as std:🧵:id promises
that the default-constructed value is distinct from every valid value,
NO_THREAD becomes unnecessary and goes away.

Because LLMutex now stores LLThread::id_t instead of U32, make llmutex.h
#include "llthread.h" instead of the other way around. This makes LLMutex an
incomplete type within llthread.h, so move LLThread::lockData() and
unlockData() to the .cpp file. Similarly, remove llrefcount.h's #include
"llmutex.h" to break circularity; instead forward-declare LLMutex.

It turns out that a number of source files assumed that #include "llthread.h"
would get the definition for LLMutex. Sprinkle #include "llmutex.h" as needed.

In the SAFE_SSL code in llcorehttp/httpcommon.cpp, there's an ssl_thread_id()
callback that returns an unsigned long to the SSL library. When LLThread::
currentID() was U32, we could simply return that. But std:🧵:id is very
deliberately opaque, and can't be reinterpret_cast to unsigned long.
Fortunately it can be hashed because std::hash is specialized with that type.
2020-03-25 15:28:17 -04:00
Andrey Kleshchev 82e5f6c24f SL-12421 Viewer's certificate validation does not reject connections 2020-03-04 19:13:55 +02:00
andreykproductengine 1b4d5492c6 SL-11727 Fix build warnings 2019-10-23 16:37:15 +03:00
Oz Linden e409c0492f convert to an explicit USE_BUGSPLAT switch in cmake, revise LL_ERRS approach 2019-03-02 11:58:11 -05:00
Brad Kittenbrink 6f9ea467c2 SL-10948: Fix for crash in llcorehttp/_httplibcurl.cpp.
The crash can appear on some non-windows platforms (any LP64 model platforms).
Depending on alignment this can overwrite one word of the pointer `op` declared
above.  Subsequently it will crash when later writing to memory through that
pointer
2019-04-11 17:14:15 -07:00