<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llcorehttp/tests/test_bufferstream.hpp, branch cef_147</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=cef_147</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=cef_147'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2024-04-29T04:56:09Z</updated>
<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://megapahit.org/viewer.git/commit/?id=1b68f71348ecf3983b76b40d7940da8377f049b7'/>
<id>urn:sha1:1b68f71348ecf3983b76b40d7940da8377f049b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>DRTVWR-476: Remove special llcorehttp test memory manager.</title>
<updated>2020-03-25T22:44:04Z</updated>
<author>
<name>Nat Goodspeed</name>
<email>nat@lindenlab.com</email>
</author>
<published>2019-06-27T14:57:34Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=2902f23a4193d93c2e96daa45587a8c597c0a831'/>
<id>urn:sha1:2902f23a4193d93c2e96daa45587a8c597c0a831</id>
<content type='text'>
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&lt;n&gt;() 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.
</content>
</entry>
<entry>
<title>remove execute permission from many files that should not have it</title>
<updated>2015-11-10T14:48:56Z</updated>
<author>
<name>Oz Linden</name>
<email>oz@lindenlab.com</email>
</author>
<published>2015-11-10T14:48:56Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=c8726aba303bcf1207b730a344536e25491420bc'/>
<id>urn:sha1:c8726aba303bcf1207b730a344536e25491420bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update Mac and Windows breakpad builds to latest</title>
<updated>2013-03-29T14:50:08Z</updated>
<author>
<name>Graham Madarasz</name>
<email>graham@lindenlab.com</email>
</author>
<published>2013-03-29T14:50:08Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=bf6182daa8b4d7cea79310547f71d7a3155e17b0'/>
<id>urn:sha1:bf6182daa8b4d7cea79310547f71d7a3155e17b0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SH-3177, SH-3180  std::iostream and LLSD serialization for BufferArray objects.</title>
<updated>2012-06-22T18:41:08Z</updated>
<author>
<name>Monty Brandenberg</name>
<email>monty@lindenlab.com</email>
</author>
<published>2012-06-22T18:41:08Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=5ff1758b633f1984f601aacbb7920c3c744b87f7'/>
<id>urn:sha1:5ff1758b633f1984f601aacbb7920c3c744b87f7</id>
<content type='text'>
Seems to be working correctly.  Not certain this is the fastest possible way
to provide a std::streambuf interface but it's visually acceptable.
</content>
</entry>
<entry>
<title>Compiler warning fix on linux.</title>
<updated>2012-06-22T00:02:24Z</updated>
<author>
<name>Monty Brandenberg</name>
<email>monty@lindenlab.com</email>
</author>
<published>2012-06-22T00:02:24Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=eed28348f2668c93bc572cffd8a284e65228ed02'/>
<id>urn:sha1:eed28348f2668c93bc572cffd8a284e65228ed02</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SH-3177 Add streambuf/iostream adapters to BufferArray object.</title>
<updated>2012-06-21T23:45:40Z</updated>
<author>
<name>Monty Brandenberg</name>
<email>monty@lindenlab.com</email>
</author>
<published>2012-06-21T23:45:40Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=4da93b6ad91dff1de98c3c8dd3674c0544f2958b'/>
<id>urn:sha1:4da93b6ad91dff1de98c3c8dd3674c0544f2958b</id>
<content type='text'>
Initial version that should have enough of the plumbing to produce
a working adapter.  Memory test is showing 8 bytes held after one
of the tests so I'm going to revisit that later.  But basic
functionality is there going by the unit tests.
</content>
</entry>
</feed>
