summaryrefslogtreecommitdiff
path: root/indra/llcommon
AgeCommit message (Collapse)Author
2024-09-05Fix build errors from merging develop into release/luau-scripting.Nat Goodspeed
2024-09-05In llcoromutex.h, pull in llcoro::RMutex from develop branch.Nat Goodspeed
Also add develop branch's comments about llcoro::LockType being deprecated.
2024-09-05Fix a merge glitch in llcoros.h.Nat Goodspeed
2024-09-05Merge branch 'develop' into release/luau-scriptingNat Goodspeed
2024-09-05Fixed md5 buffer not being correctly zero-initialized and refactored code. ↵TJ
(#2507)
2024-09-04Windows build fixesNat Goodspeed
2024-09-04Extract coroutine-aware synchronization primitives to new header.Nat Goodspeed
Changes on new main and changes on Lua project branch combined into a header circularity. Resolved by hoisting coroutine-aware synchronization primitives out to a new llcoromutex.h file in the `llcoro` namespace, rather than being literally members of the `LLCoros` class. But retained `using` declarations in `LLCoros` for backwards compatibility.
2024-08-28Ditch trailing spaces.Nat Goodspeed
2024-08-28Merge branch 'main' into release/luau-scripting.Nat Goodspeed
2024-08-28Attempt to get better file/line info for LL_ERRS crahses in bugsplat. (#2447)Brad Linden
secondlife/viewer#2445
2024-08-27code clean upMnikolenko Productengine
2024-08-26Improve safety of macOS available RAM calcuations at suggestion of Ansariel ↵Brad Linden
and Beq (#2423)
2024-08-26secondlife/viewer#2391: Remove avatar rigging "callstack" loggingCosmic Linden
2024-08-26Remove or suppress left over debug messages in hot paths (#2392)Rye Mutt
2024-08-21Merge branch 'release/luau-scripting' into lua-inventoryMaxim Nikolenko
2024-08-21Improve diagnostic output for Lua atexit() functions.Nat Goodspeed
2024-08-21Suppress ~LuaStackDelta() verification during stack unwinding.Nat Goodspeed
Otherwise, an exception raised in the block containing a LuaStackDelta instance -- that might be caught -- would result in an LL_ERRS() crash. We can't expect a block exited via exception to keep its contract wrt the Lua data stack.
2024-08-20Fix for #2237: intermittent Lua data stack overflow.Nat Goodspeed
Use a static unordered_map to allow a function receiving (lua_State* L) to look up the LuaState instance managing that lua_State. We've thought about this from time to time already. LuaState's constructor creates the map entry; its destructor removes it; the new static getParent(lua_State* L) method performs the lookup. Migrate lluau::set_interrupts_counter() and check_interrupts_counter() into LuaState member functions. Add a new mInterrupts counter for them. Importantly, LuaState::check_interrupts_counter(), which is indirectly called by a lua_callbacks().interrupt function, no longer performs any Lua stack operations. Empirically, it seems the Lua engine is capable of interrupting itself at a moment when re-entry confuses it. Change previous lluau::set_interrupts_counter(L, 0) calls to LuaState::getParent(L).set_interrupts_counter(0). Also add LuaStackDelta class, and a lua_checkdelta() helper macro, to verify that the Lua data stack depth on exit from a block differs from the depth on entry by exactly the expected amount. Sprinkle lua_checkdelta() macros in likely places.
2024-08-20Fix TempSet to use type VAR to store mOldValue.Nat Goodspeed
In fact we set mOldValue from mVar, and restore mVar from mOldValue, so the VAR type makes the most sense. The previous way, you'd get actual errors if you tried to use TempSet(pointervar, nullptr): that declared mOldValue to be nullptr_t, which you can't initialize from mVar.
2024-08-20Add LL::scope_exitNat Goodspeed
2024-08-20Add collectDescendentsIf api for LuaMnikolenko Productengine
2024-08-20Merge remote-tracking branch 'origin/release/2024.06-atlasaurus' into developBrad Linden
# Conflicts: # autobuild.xml # indra/newview/llvoicewebrtc.cpp
2024-08-20Clean up boost includes and remove compiler warning pragma for unreachable ↵Ansariel Hiller
code in PCH (#2361)
2024-08-20Remove orphaned LLAllocator (#2348)Ansariel Hiller
2024-08-19Refactor LLFileSystem for and fix an old issue in LLFile (#2332)Ansariel Hiller
2024-08-15First batch of Inventory api; raise interrupts limitMnikolenko Productengine
2024-08-15Merge remote-tracking branch 'origin/release/webrtc-voice' into ↵Brad Linden
release/2024.06-atlasaurus
2024-08-15BugSplat Crash #1504587: std::vector::empty()Alexander Gavriliuk
2024-08-15Merge branch 'release/luau-scripting' into viewer-lua-2237Nat Goodspeed
2024-08-15Introduce lluau_checkstack(L, n); use instead of luaL_checkstack().Nat Goodspeed
luaL_checkstack() accepts a third parameter which is included in the stack overflow error message. We've been passing nullptr, leading to messages of the form "stack overflow ((null))". lluau_checkstack() implicitly passes __FUNCTION__, so we can distinguish which underlying luaL_checkstack() call encountered the stack overflow condition. Also, when calling each atexit() function, pass Luau's debug.traceback() function as the lua_pcall() error handler. This should help diagnose errors in atexit() functions.
2024-08-14Enable /permissive- on MSVC for better standards conformance (#2251)Rye Mutt
* Enable /permissive- on MSVC for better C++ conformance and fix related errors * Clean up left over warning suppressions from old library or msvc versions
2024-08-13Introduce tracy instrumentation of mutex in LLSingleton, LLInstanceTracker ↵Rye Mutt
and logging
2024-08-13Update tracy integration to 0.11 and rework client library to be ↵Rye Mutt
configurable at build time Also copy tracy profiler client next to windows binary when enabled
2024-08-13Merge pull request #2265 from secondlife/lua-groupchat-throttleMaxim Nikolenko
Add Throttle and LogThrottle classes to manage throttled APIs.
2024-08-12Add virtual destructor to Throttle class.Nat Goodspeed
2024-08-12Add Throttle and LogThrottle classes to manage throttled APIs.Nat Goodspeed
2024-08-09Merge remote-tracking branch 'origin/release/2024.06-atlasaurus' into developBrad Linden
# Conflicts: # .github/workflows/build.yaml # indra/llui/llscrolllistctrl.cpp
2024-08-09Merge remote-tracking branch 'origin/release/webrtc-voice' into ↵Brad Linden
release/2024.06-atlasaurus # Conflicts: # .github/workflows/build.yaml # indra/newview/CMakeLists.txt # indra/newview/llspeakers.cpp # indra/newview/llvoicechannel.cpp # indra/newview/llvoicechannel.h # indra/newview/llvoiceclient.cpp # indra/newview/llvoiceclient.h # indra/newview/llvoicewebrtc.cpp
2024-08-07Allow smaller minimum timer intervals.Nat Goodspeed
Add test_flycam.lua to exercise the smaller intervals.
2024-08-07Replace boost::shared_ptr with std in voice classesAndrey Kleshchev
2024-08-06Merge branch 'release/luau-scripting' into viewer-lua-smootherNat Goodspeed
2024-08-06Introduce a custom coroutine/fiber scheduler to prioritize UI.Nat Goodspeed
The viewer's main thread's main fiber is responsible for coordinating just about everything. With the default round_robin fiber scheduling algorithm, launching too many additional fibers could starve the main fiber, resulting in visible lag. This custom scheduler tracks when it switches to and from the main fiber, and at each context switch, how long it's been since the last time the main fiber ran. If that exceeds a certain timeslice, it jumps the main fiber to the head of the queue and resumes that instead of any other ready fiber.
2024-08-02Merge branch 'release/luau-scripting' into lua-login2Nat Goodspeed
2024-08-01Add lua_push(), lua_to(), lua_[gs]etfieldv(), lua_raw[gs]etfield().Nat Goodspeed
Leverage C++ overloads to allow use of generic function names disambiguated by argument type. This allows using templates for certain common operation sequences.
2024-08-01Fix failure to join or detach threads causing rare shutdown terminationRye Mutt
2024-07-29Replace liburiparser with boost::urlRye Mutt
2024-07-19Merge pull request #1996 from secondlife/davep/fix_tracy_buildBrad Linden
Fix for tracy build.
2024-07-19#2053 BugSplat Crash #1494325: LLVOVolume::getReflectionProbeNearClip()Alexander Gavriliuk
2024-07-18Improve viewer's defense against `LLEventAPI` failures.Nat Goodspeed
`LLEventAPI` is specifically intended to allow a LEAP plugin, or a Lua script, to access certain viewer functionality. Errors in external code like that cannot be addressed during viewer development. Any code path that allows external code in any form to crash the viewer opens up a potential abuse vector, if a trusting user runs external code from an untrustworthy source. `LLDispatchListener` reports exceptions back to its invoker, if the invoker provides a "reply" `LLEventPump` name. Absent "reply", though, `LLDispatchListener` is documented to let any such exception propagate. That behavior may be okay for internal use, but in the case of the `LLEventAPI` subclass, it veers into the abuse scenario described above. Make `LLEventAPI` ensure that any exception propagating from `LLDispatchListener` is caught and logged, but not propagated. Also enrich error reporting for the "batch" `LLDispatchListener` operations.
2024-07-18Ditch `LLEventTrackable` aka `boost::signals2::trackable`.Nat Goodspeed
Remove documented `LLEventPump` support for `LLEventTrackable`. That claimed support was always a little bit magical/fragile. IF: * a class included `LLEventTrackable` as a base class AND * an instance of that class was managed by `boost::shared_ptr` AND * you passed one of that class's methods and the `boost::shared_ptr` specifically to `boost::bind()` AND * the resulting `boost::bind()` object was passed into `LLEventPump::listen()` THEN the promise was that on destruction of that object, that listener would automatically be disconnected -- instead of leaving a dangling pointer bound into the `LLEventPump`, causing a crash on the next `LLEventPump::post()` call. The only existing code in the viewer code base that exercised `LLEventTrackable` functionality was in test programs. When the viewer calls `LLEventPump::listen()`, it typically stores the resulting connection object in an `LLTempBoundListener` variable, which guarantees disconnection on destruction of that variable. The fact that `LLEventTrackable` support is specific to `boost::bind()`, that it silently fails to keep its promise with `std::bind()` or a lambda or any other form of C++ callable, makes it untrustworthy for new code. Note that the code base still uses `boost::signals2::trackable` for other `boost::signals2::signal` instances not associated with `LLEventPump`. We are not changing those at this time.