summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluuid.cpp
AgeCommit message (Collapse)Author
2023-05-17Merge remote-tracking branch 'origin/main' into DRTVWR-559Brad Linden
2023-03-06DRTVWR-559 Return to MD5 for LLUUID operations. Existing LLUUID API ↵Dave Parks
implementations must not change, but may add "fast" variants where appropriate in the future.
2023-02-13SL-19110 revert LLUUID::combine() to old algorithm to match server code. (#75)Henri Beauchamp
As it happens, the change in the LLUUID::combine() algorithm introduced by one of my previous commits is causing invalid assets creation (seen with some clothing items, such as Shape and Universal types); obviously, the server is using the old algorithm for UUID validation purpose of these assets. This commit reverts LLUUID::combine() code to use LLMD5.
2023-02-13SL-19110 revert LLUUID::combine() to old algorithm to match server code. (#75)Henri Beauchamp
As it happens, the change in the LLUUID::combine() algorithm introduced by one of my previous commits is causing invalid assets creation (seen with some clothing items, such as Shape and Universal types); obviously, the server is using the old algorithm for UUID validation purpose of these assets. This commit reverts LLUUID::combine() code to use LLMD5.
2023-02-09Merge branch 'main' into DRTVWR-577-maint-SAndrey Kleshchev
# Conflicts: # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm
2023-02-02Merge remote-tracking branch 'origin/main' into DRTVWR-559Brad Linden
2023-01-31SL-19110 Fast hashing classes for use in place of the slow LLMD5, where ↵Henri Beauchamp
speed matters. (#64) This commit adds the HBXX64 and HBXX128 classes for use as a drop-in replacement for the slow LLMD5 hashing class, where speed matters and backward compatibility (with standard hashing algorithms) and/or cryptographic hashing qualities are not required. It also replaces LLMD5 with HBXX* in a few existing hot (well, ok, just "warm" for some) paths meeting the above requirements, while paving the way for future use cases, such as in the DRTVWR-559 and sibling branches where the slow LLMD5 is used (e.g. to hash materials and vertex buffer cache entries), and could be use such a (way) faster algorithm with very significant benefits and no negative impact. Here is the comment I added in indra/llcommon/hbxx.h: // HBXXH* classes are to be used where speed matters and cryptographic quality // is not required (no "one-way" guarantee, though they are likely not worst in // this respect than MD5 which got busted and is now considered too weak). The // xxHash code they are built upon is vectorized and about 50 times faster than // MD5. A 64 bits hash class is also provided for when 128 bits of entropy are // not needed. The hashes collision rate is similar to MD5's. // See https://github.com/Cyan4973/xxHash#readme for details.
2023-01-31SL-19110 Fast hashing classes for use in place of the slow LLMD5, where ↵Henri Beauchamp
speed matters. (#64) This commit adds the HBXX64 and HBXX128 classes for use as a drop-in replacement for the slow LLMD5 hashing class, where speed matters and backward compatibility (with standard hashing algorithms) and/or cryptographic hashing qualities are not required. It also replaces LLMD5 with HBXX* in a few existing hot (well, ok, just "warm" for some) paths meeting the above requirements, while paving the way for future use cases, such as in the DRTVWR-559 and sibling branches where the slow LLMD5 is used (e.g. to hash materials and vertex buffer cache entries), and could be use such a (way) faster algorithm with very significant benefits and no negative impact. Here is the comment I added in indra/llcommon/hbxx.h: // HBXXH* classes are to be used where speed matters and cryptographic quality // is not required (no "one-way" guarantee, though they are likely not worst in // this respect than MD5 which got busted and is now considered too weak). The // xxHash code they are built upon is vectorized and about 50 times faster than // MD5. A 64 bits hash class is also provided for when 128 bits of entropy are // not needed. The hashes collision rate is similar to MD5's. // See https://github.com/Cyan4973/xxHash#readme for details.
2022-10-25Restore LLUUID to a plain old data type in a post-c++11 worldRye Mutt
2021-06-07Merge with tip of Master after Viewer releaseCallum Prentice
2021-05-17SL-15200: Add LLApp::sleep(duration) methods.Nat Goodspeed
Two sleep() methods: one accepting F32Milliseconds, or in general any LLUnits time class; the other accepting any std::chrono::duration. The significant thing about each of these sleep() methods, as opposed to any freestanding sleep() function, is that it only sleeps until the app starts shutdown. Moreover, it returns true if it slept for the whole specified duration, false if it woke for app shutdown. This is accomplished by making LLApp::sStatus be an LLScalarCond<EAppStatus> instead of a plain EAppStatus enum, and by making setStatus() call set_all() each time the value changes. Then each new sleep() method can call wait_for_unequal(duration, APP_STATUS_RUNNING). Introducing llcond.h into llapp.h triggered an #include circularity because llthread.h #included llapp.h even though it didn't reference anything from it. Removed. This, in turn, necessitated adding #include "llapp.h" to several .cpp files that reference LLApp but had been depending on other header files to drag in llapp.h.
2020-10-08DRTVWR-510 remove all LL_SOLARIS conditionalsDave Houlton
2020-03-25DRTVWR-494: Use std::thread::id for LLThread::currentID().Nat Goodspeed
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::thread::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::thread::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::thread::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.
2019-01-14SL-10291 Replace apr_mutex with standard C++11 functionalityandreykproductengine
2016-08-17MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().Nat Goodspeed
A level of preprocessor indirection lets us later change the implementation if desired.
2016-07-19MAINT-5011: Introduce LLException base class for viewer exceptions.Nat Goodspeed
This also introduces LLContinueError for exceptions which should interrupt some part of viewer processing (e.g. the current coroutine) but should attempt to let the viewer session proceed. Derive all existing viewer exception classes from LLException rather than from std::runtime_error or std::logic_error. Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown exception with source file, line number and containing function.
2015-11-10remove execute permission from many files that should not have itOz Linden
2013-08-09second phase summer cleaningRichard Linden
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-06-05merge with viewer-releaseRichard Linden
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-01-04Automated merge with http://bitbucket.org/lindenlab/viewer-developmentRichard Linden
2012-12-18MAINT-1986: patch OPSDEV-111 fix (rev 9346b73d6843) from server-trunkNat Goodspeed
2012-12-18MAINT-1986: patch DEV-50942 fix (rev 28828ba0f0be) from server-trunk.Nat Goodspeed
2012-11-14SH-3406 WIP convert fast timers to lltrace systemRichard Linden
cleaning up build moved most includes of windows.h to llwin32headers.h to disable min/max macros, etc streamlined Time class and consolidated functionality in BlockTimer class llfasttimer is no longer included via llstring.h, so had to add it manually in several places
2012-05-31WIP:Displaying physics capsule for a character - it is currently disabled.prep
2010-08-13Change license from GPL to LGPL (version 2.1)Oz Linden
2010-06-22Revert to previous implementation of getNodeId.Andrew A. de Laix
2010-04-07Re-insert backed out SLE checkin so we can fix itRoxie Linden
2010-04-07Backed out changeset 63b699f90efdTofu Linden
2010-03-02fix windows build break againRoxie Linden
2010-03-01Automated merge with a few fixups for code review commentsRoxie Linden
2010-02-05remove windows line endings introduced via transplantRoxie Linden
2009-10-15Use malloc in order to fix linking issueKaren Lahey
2009-10-15MAC Address Change no longer causes viewer to die cr:RoxieKaren Lahey
2009-01-17svn merge -r108142:108148 ↵Andrew Meadows
svn+ssh://svn.lindenlab.com/svn/linden/qa/maint-server/maint-server-5-r108113
2009-01-08Result of svn merge -r107256:107258 ↵Aaron Brashears
svn+ssh://svn/svn/user/phoenix/license_2009_merge into trunk. QAR-1165
2009-01-05svn merge -r106715:HEAD ↵Kent Quirk
svn+ssh://svn.lindenlab.com/svn/linden/branches/q/notifications-merge-r106715 . QAR-1149 -- Final merge of notifications to trunk.
2008-07-15svn merge -r 90938:92097 ↵Jon Wolk
svn+ssh://svn.lindenlab.com/svn/linden/branches/qar-730/qar-730-merge -> release. This is for QAR-730: Combination merge of QAR-432 and QAR-601
2008-06-26QAR-628 merge string-cleanup-5 -r 90476:90508 -> releaseSteven Bennetts
dataserver-is-deprecated
2008-06-02svn merge -r88066:88786 ↵Bryan O'Sullivan
svn+ssh://svn.lindenlab.com/svn/linden/branches/cmake-9-merge dataserver-is-deprecated for-fucks-sake-whats-with-these-commit-markers