Skip to content

Releases: SolidWallOfCode/libswoc

C++mas Edition

18 Dec 17:52
Compare
Choose a tag to compare

Just in time for the holidays, a new release of libSWOC! This is a bit bigger than other recent point releases due to increased integration in ATS.

  • Fixed possible overflow bug in svtoi.
  • IP networking support
    • Generalization of network category (multicast, private, etc.).
    • Better endian handling.
    • Added some missing / unimplemented methods.
  • Errata: Auto text support for error codes in constructor and note method.
  • MemArena - support discard allocated spans.

Perpetual Change

28 Nov 19:57
Compare
Choose a tag to compare

Minor tweaks

  • Errata now supports more constructors along with "AUTO" text generation based on the error code and severity.
  • Errata::is_ok fix (false positives if no messages but severity).
  • IPAddr - added const to certain methods.
  • Improved clang formatting, more Traffic Server compliant.
  • Added let to meta utilities. This enables changing the value of variables in a scope.

Clanging gong

15 Nov 23:06
Compare
Choose a tag to compare
  • IPSpace - fix compiler issue with auto && [ r, p ] = *space.find(addr) type constructs.
  • Fix CMake hard coded install directory.
  • Update clang format to ATS 10, update related tools, apply.
  • swoc::file construct from string.
  • Better hashing for IP addresses.

IP man

22 Sep 18:22
Compare
Choose a tag to compare

Primarily a bug fix release.

  • Port access from IPEndpoint was too fragile, throwing an exception in situations it shouldn't.
  • When iterating over IPSpace instances with both IPv4 and IPv6 addresses, the latter would be badly formatted.

For convenience, IntrusiveDList was extended to support list operations (e.g., appending one list to another).

Leif Storm

07 Aug 15:10
Compare
Choose a tag to compare

Minor ATS compatibility release.

  • Added UnHex wrapper for BWF to convert hexadecimal strings to raw byte buffers (conversion the other way is already supported).
  • Better std:error_code handlin.

Spanning the Void

25 Jul 20:58
Compare
Choose a tag to compare

More minor tweaks for ATS support.

  • IP - better handling of sockaddr types.
  • MemSpan - better construction for stricter const correctness.
  • MemSpan - handle literal strings better by excluding the terminal nul character by default.
  • MemSpan - related to above, handle C arrays better.
  • MemSpan - add restrict method to optionally shorten the view (change to minimum of current size, restrict value).
  • BWF - remove direct support for C strings - depend on MemSpan instead.

The Home Front

13 Jul 16:54
Compare
Choose a tag to compare

A small release for better ATS compatibility as work on replacing legacy code with libswoc continues.

  • More size based constructors for TextView to allowing using various integral types without casting.
  • BufferWriter
    • Support passing an instance for printing. Internally this convers it to a view and prints that, but it's an idiom used in ATS.
    • Generic memory changed to MemSpan<const void> for less casting and amibiguity.

Mask of Zorro

15 Jun 18:26
9ca0f44
Compare
Choose a tag to compare

Emergency release to fix a bug in the handling of certain edge cases between IP address classes and IPMask.

Hawaii

11 Jun 18:03
Compare
Choose a tag to compare

A consolidation release. There are a few backward incompatibilities but these are easily fixed. Fundamentally there was an issue in how temporaries for IPSpace were handled when using tuple style support which were not possible to fix without breaking compatibility - correctness over convenience. There are many fixes to documentation comments and a number of additional convenience methods, along with as always more testing.

  • IPSpace supports tuple style access to iterator values but internally this is now a structure because the tuple implementation could not be made to work correctly with strong optimization. This is compatible except in certain cases noted below.
  • Some of the is_valid methods methods for "container" classes were changed to empty and inverted. Locally this is irrelevant but using empty to check for container validity is the common style for STL so this changes makes using the IP network support easier.
  • A new class IPRangeView which is a view to an IP address range. This is used to minimize copying when the actual stored data is family specific but external consumers want the generic wrapper. Previously this required a copy. The view class contains family specific pointers internally and forwards generic access to family specific access.

libswoc can now be built in github which means better checking for branches.

libswoc is now a Coverity covered project. The initial check against 1.5.0 yielded no problems although there were two false positives. The latter are complaints about calling stat before unlink and opendir as if not doing that was safer. I explicitly disagree.

Compatibility notes:

  • lower_bound and upper_bound were changed to min, max respectively for consistency.
  • is_valid was changed in some cases to empty for consistency.
  • R-value reference in structured binding is no longer support for temporary iterators. E.g.
    if (auto && [ r, p ] = *space.find(addr) ; ! r.empty()) {
    
    Although this mostly worked, in some cases it could create dangling references because the range was stored in the iterator. The range msut be a synthesized value because the internals store only family specific types. The fix is to use
    if (auto [ r, p ] = *space.find(addr) ; ! r.empty()) {
    
    The new class IPRangeView was created to support this style with minimal copying.

Too much tuple

05 Jun 17:06
Compare
Choose a tag to compare

Primarily cleanup in IP network support.

  • A bug in mask generation was fixed.
  • libswoc can now be built on github.
  • Internally IPSpace now uses a structure instead of a tuple. It was becoming increasing difficult to update the API as needed with a tuple.

One of the reasons for the change from a tuple is a compiler issue I was unable to track down where an IPSpace iterator would not iterate at run time in release mode. I suspect it was a bad optimization by the compiler with regard to reference values. Building release with symbols caused the problem to disappear making it almost impossible to usefully run a debugger on the problem. Of course everything worked in debug mode. Even adding some instrumentation code to detect the failure "fixed" the problem.