<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcommon/llsd.cpp, branch cef_147</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://www.megapahit.org/viewer.git/atom?h=cef_147</id>
<link rel='self' href='https://www.megapahit.org/viewer.git/atom?h=cef_147'/>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/'/>
<updated>2026-01-21T20:07:08Z</updated>
<entry>
<title>Address feedback from review</title>
<updated>2026-01-21T20:07:08Z</updated>
<author>
<name>Rye</name>
<email>rye@alchemyviewer.org</email>
</author>
<published>2026-01-12T23:33:39Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=0b2f7fcc6b67f629b41a804f77214d51497127a7'/>
<id>urn:sha1:0b2f7fcc6b67f629b41a804f77214d51497127a7</id>
<content type='text'>
Move LLSD string-&gt;real conversion function to shared impl and utilize in xml parsing
Introducing additional error handling to menu init
Cleanup comments and trace tagging
Remove dead Memory menu entry
</content>
</entry>
<entry>
<title>Heavily reduce temporary allocations during LLSD parsing operations by utilizing moves and reducing temporary allocations</title>
<updated>2026-01-21T20:07:08Z</updated>
<author>
<name>Rye</name>
<email>rye@alchemyviewer.org</email>
</author>
<published>2026-01-11T18:38:37Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=4de1ba776c60e935e8cf069c1aef104ee2b07559'/>
<id>urn:sha1:4de1ba776c60e935e8cf069c1aef104ee2b07559</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix for crash in XMLRPC reply decoding on login with large inventories</title>
<updated>2024-07-08T21:18:02Z</updated>
<author>
<name>Henri Beauchamp</name>
<email>sldev@free.fr</email>
</author>
<published>2024-07-08T21:18:02Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=989cfe2f70441fe02222d369e84118a94dc96890'/>
<id>urn:sha1:989cfe2f70441fe02222d369e84118a94dc96890</id>
<content type='text'>
Commit 2ea5ac0c43e3e28d2b1774f5367d099271a1da32 introduced a crash bug
due to the recursive construction of the XMLTreeNode wrapper class.
The constructor of the said class typically recurses twice as many times
as there are entries in the user's inventory list.

This commit:
- Moves the fromXMLRPCValue() method and its helper functions from the LLSD
  class/module to the LLXMLNode class, where it belongs, thus making
  LLSD::TreeNode (which was a wrapper class to avoid making llcommon
  dependant on llxml, which is still the case after this commit) totally
  moot; the fromXMLRPCValue() call is now done directly on the LLXMLNode.
- Moves the XML and XMLRPC decoding code out of the HTTP coroutine
  LLXMLRPCTransaction::Handler (coroutines got an even smaller and fixed
  stack), and into LLXMLRPCTransaction::Impl::process().
- Removes XMLTreeNode entirely, fixing the crash as a result.
</content>
</entry>
<entry>
<title>Add move construction/assignment support for LLSD type</title>
<updated>2024-07-05T06:56:25Z</updated>
<author>
<name>Rye Mutt</name>
<email>rye@alchemyviewer.org</email>
</author>
<published>2024-07-04T09:02:46Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=6cf176900f0c89e20557742dbcd1174799440f8f'/>
<id>urn:sha1:6cf176900f0c89e20557742dbcd1174799440f8f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce move assignment operators for various LLSD types</title>
<updated>2024-07-05T06:56:25Z</updated>
<author>
<name>Rye Mutt</name>
<email>rye@alchemyviewer.org</email>
</author>
<published>2024-07-04T04:49:45Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=7df1edbde100d1c07bd4d2edcfa76ea7a870de42'/>
<id>urn:sha1:7df1edbde100d1c07bd4d2edcfa76ea7a870de42</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Introduce string_view to LLSD map functions to reduce string temporaries</title>
<updated>2024-07-05T06:56:24Z</updated>
<author>
<name>Rye Mutt</name>
<email>rye@alchemyviewer.org</email>
</author>
<published>2024-07-03T21:32:45Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=59312bf209c5fcdb27c283caaa2ed36502ec7a33'/>
<id>urn:sha1:59312bf209c5fcdb27c283caaa2ed36502ec7a33</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#1111 Remove xmlrpc-epi</title>
<updated>2024-07-01T18:20:04Z</updated>
<author>
<name>Alexander Gavriliuk</name>
<email>alexandrgproductengine@lindenlab.com</email>
</author>
<published>2024-07-01T11:34:50Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=2ea5ac0c43e3e28d2b1774f5367d099271a1da32'/>
<id>urn:sha1:2ea5ac0c43e3e28d2b1774f5367d099271a1da32</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed</title>
<updated>2024-04-29T04:56:09Z</updated>
<author>
<name>Andrey Lihatskiy</name>
<email>alihatskiy@productengine.com</email>
</author>
<published>2024-04-29T04:43:28Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=1b68f71348ecf3983b76b40d7940da8377f049b7'/>
<id>urn:sha1:1b68f71348ecf3983b76b40d7940da8377f049b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-575: Fix possible bad indexing in LLSD::operator[](size_t).</title>
<updated>2023-01-04T22:18:31Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2023-01-04T22:18:31Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=99c040ea9976e90caec9dedd942badc1c43822e7'/>
<id>urn:sha1:99c040ea9976e90caec9dedd942badc1c43822e7</id>
<content type='text'>
One could argue that passing a negative index to an LLSD array should do
something other than shrug and reference element [0], but as that's legacy
behavior, it seems all too likely that the viewer sometimes relies on it.

This specific problem arises if the index passed to operator[]() is negative
-- either with the previous Integer parameter or with size_t (which of course
reinterprets the negative index as hugely positive). The non-const
ImplArray::ref() overload checks parameter 'i' and, if it appears negative,
sets internal 'index' to 0.

But in the next stanza, if (index &gt;= existing size()), it calls resize() to
scale the internal array up to one more than the requested index. The trouble
is that it passed resize(i + 1), not the adjusted resize(index + 1).

With a requested index of exactly -1, that would pass resize(0), which would
result in the ensuing array[0] reference being invalid.

With a requested index less than -1, that would pass resize(hugely positive)
-- since, whether operator[]() accepts signed LLSD::Integer or size_t,
resize() accepts std::vector::size_type. Given that the footprint of an LLSD
array element is at least a pointer, the number of bytes required for
resize(hugely positive) is likely to exceed available heap storage.

Passing the adjusted resize(index + 1) should defend against that case.
</content>
</entry>
<entry>
<title>DRTVWR-575: Address review comments on Xcode 14.1 type tweaks.</title>
<updated>2022-11-13T04:59:21Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2022-11-13T04:59:21Z</published>
<link rel='alternate' type='text/html' href='https://www.megapahit.org/viewer.git/commit/?id=4349cb6165e983ff6bdd45ad1b82bb98bfc0436f'/>
<id>urn:sha1:4349cb6165e983ff6bdd45ad1b82bb98bfc0436f</id>
<content type='text'>
Introduce LLSD template constructors and assignment operators to disambiguate
construction or assignment from any integer type to Integer, likewise any
floating point type to Real. Use new narrow() function to validate
conversions.

For LLSD method parameters converted from LLSD::Integer to size_t, where the
method previously checked for a negative argument, make it now check for
size_t converted from negative: in other words, more than S32_MAX. The risk of
having a parameter forced from negative to unsigned exceeds the risk of a
valid length or index over that max.

In lltracerecording.cpp's PeriodicRecording, now that mCurPeriod and
mNumRecordedPeriods are size_t instead of S32, defend against subtracting 1
from 0.

Use narrow() to validate newly-introduced narrowing conversions.

Make llclamp() return the type of the raw input value, even if the types of
the boundary values differ.

std::ostream::tellp() no longer returns a value we can directly report as a
number. Cast to U64.
</content>
</entry>
</feed>
