-
Notifications
You must be signed in to change notification settings - Fork 19
/
HISTORY.txt
8216 lines (7946 loc) · 455 KB
/
HISTORY.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
This file contains the version history/change log for this software.
key: - new feature
* bug fixed
o other
- Added a PreallocatedItemSlotsCount class to MuscleSupport.h
which can be used to explicitly specify how many item-slots
a container's constructor should preallocate space for.
- Added constructors to the Queue, Hashtable, and String classes
that take a PreallocatedItemSlotsCount as an argument.
- Added a GetUnmangledSymbolName() utility function to
util/MiscUtilityFunctions.h, for easier stack trace reading.
- When debug or trace output is enabled, the deadlock finder
will now capture stack traces and print them out as part of
its detected-deadlock output.
- Added a copy constructor to the ICallbackSubscriber class.
o Tweaked Snooze64() to handle long snooze times a bit better.
o Simplified the EmscriptenWebSocket callback API.
o Replaced overloaded_preprocessor_macro.h with conditional
usage of the comma-swallowing operator (##__VA_ARGS__).
* The deadlock finder no longer warns about inconsistent
locking orders that consist entirely of shared/read-only locks.
* The deadlock finder no longer considers TryLock() calls at
the end of a locking-sequence to be significant, as they
can't affect the deadlocking behavior of the app.
* Fixed capitalization of Emscripten callback method names.
* Fixed some build warnings under MSVC.
* Updated the MutexLockRecordLog and MutexLockSequencesRecord
classes so they are properly initialized via a constructor
and placement-new, rather than an ad-hoc Initialize() method.
9.50 - Released 12/31/2024
- Added the IncrementalHashCalculator class and related utility
functions, in util/IncrementalHashCalculator.{cpp,h}.
- Added an optional (withSpaces) argument to the HexBytesToString()
and ByteBuffer::ToHexString() methods.
- Added Base64Encode() and Base64Decode() functions to
MiscUtilityFunctions.{cpp,h}, based on John Walker's Base64 code.
- Added WebSocketDataIOGateway.{cpp,h} to the iogateways folder.
- Added optional (runUntil) and (optRetNextPulseTime) arguments to
ReflectServer::ServerProcessLoop(), to facilitate periodically
pumping the event loop manually from a higher-level event-loop.
- Added a dummy/no-op implementation to the SocketMultiplexer class.
Specify -DMUSCLE_USE_DUMMYNOP on the compile line to use it.
- Added an EmscriptenReflectServer class to the platform/emscripten
folder, to support driving an event loop from async callbacks.
- Added an EmscriptenWebSocketDataIO class to the platform/emscripten
folder, to support network I/O via the Emscripten WebSocket API.
- Added an EmscriptenAsyncCallback class to the platform/emscripten folder,
to manage Emscripten's non-cancellable async callbacks.
- Added an EmscriptenCallbackMechanism to the platform/emscripten folder.
o Split the StringMatcher constructor in two, so that implicit
construction of a StringMatcher from a String argument can happen.
o Renamed ParseHexBytes() to HexBytesFromString(), and updated it
to also handle hex-strings without spaces (e.g. "015A2B66").
o The Thread class now automatically disables its messaging-sockets
option when compiling with Emscripten, since WebAssembly doesn't
currently support socket-pair signalling anyway.
* Fixed a bug in HashtableIterator's move-operator that could cause
a moved-into HashtableIterator not to point to the expected content.
* Fixed CMakeLists.txt not to include minizip.c and miniunz.c in
the compiled muscle library.
* ParseFile() was incorrectly returning B_BAD_ARGUMENT when an
empty String was passed to it. Fixed.
9.44 - Released 12/16/2024
- Added an optional human-readable name field to ReaderWriterMutex.
- Added a GetInsecurePseudoRandomNumber() function to MiscUtilityFunctions,
just to minimize the number of direct calls to rand().
- Added a move-assignment-operator, a move-constructor, and a
SwapContents() method to the HashtableIterator class.
- Added a move-assignment-operator and a move-constructor to the
DemandConstructedObject class.
- Added std_move_if_available() and std_forward_if_available() macros
so I can use those calls without breaking pre-C++11 compatibility.
- Added a Plunder() method to the Queue class, and updated the move-ctor
and move-assignment-operators to use it.
o Tagged a few non-NULL-returning functions with MUSCLE_NEVER_RETURNS_NULL.
o BitChord::IsBitSet() now just returns false when passed an invalid
argument, rather than triggering an assertion failure.
o PointerAndBits::IsBitSet() now just returns false when passed an invalid
argument, rather than triggering an assertion failure.
o Tagged some more methods with MUSCLE_NEVER_RETURNS_NULL where appropriate.
* The resource-tallying in AbstractReflectSessions::PrintSessionsInfo()
wasn't working correctly. Fixed.
* Applied fixes for various Coverity warnings.
* Fixed a couple of file-handle leaks in SpawnDaemonProcess().
* Fixed a use-after-free error in MiniMessage's MMMoveField() function.
9.43 - Released 11/22/2024
- Added GetKeyBefore() and GetKeyAfter() convenience-methods to
the Hashtable class.
- Added a Message::BytesMightContainFlattenedMessage() convenience method
for quick-and-dirty sanity-checking of flattened-Message bytes.
- Added SetCompleteWriteRequired() and IsCompleteWriteRequired() methods
to the DataFlattener class.
- Added a PR_MAX_CHILDREN_PER_NODE parameter to the server's parameter set.
This can be used to enforce a maximum-children-per-DataNode limit.
- Added B_RESOURCE_LIMIT error code (for when we've hit an application-
defined limit to the amount of resources we are willing to consume)
o Removed the DataFlattener::MarkWritingComplete() method as it turned
out not to be very RAII-friendly.
* Fixed a bug in MiniPacketTunnelIOGateway that could cause it to
occasionally crash with an assertion failure.
9.42 - Released 10/15/2024
- Under MacOS, GetNetworkInterfaceInfos() will now populate the
NetworkInterfaceInfo class's description field with the String
returned by SCNetworkInterfaceGetLocalizedDisplayName(), if possible.
- Added a (returnAllBitsSet) optional parameter to BitChord::ToString().
- Added a ReaderWriterMutex class and associated ReadOnlyMutexGuard
and ReadWriteMutexGuard RAII-helper-classes.
- Added a testreaderwritermutex.cpp test to the tests folder to
unit-test the new ReaderWriterMutex class.
- Added a deleted move-constructor to the HashtableIterator class
so that creation of a HashtableIterator bound to a temporary
object now becomes a compile-time error under C++11 or later.
- Added muscle-by-example documentation and examples for the new
ReadOnlyMutexGuard classes.
- Added a rwdeadlock.cpp program to the tools folder, to test
the deadlock-finder code's integration with the ReaderWriterMutex class.
* Fixed typo in Thread.h that would break pre-C++11 builds.
* Fixed the deadlock finder code to handle TryLock()/Unlock() pairs
appropriately (a TryLock() call is non-blocking so can't cause deadlock)
9.41 - Released 8/19/2024
- Added a MUSCLE_NEVER_RETURNS_NULL macro that can be used to tag functions
or methods that will never return a NULL pointer under any circumstances
(to enable a compiler warning when their caller tests against NULL)
- Added a WITH_TAGGED_POINTERS option to the CMakeLists.txt. Defaults to ON.
- Added support for -DWITH_OBJECT_COUNTING=ON to the CMakeLists.txt.
o Modified StorageReflectSession::CloneDataNodeSubtree() to no longer set
the SETDATANODE_FLAG_DONTOVERWRITEDATA flag when recursing to children.
That way, it can be used to update existing subtrees as well as create
new ones.
o Rewrote the PathMatcher class so that it now stores patterns of
different lengths in separate tables, rather than all together in a
single table. That way it's possible to efficiently access only the
patterns that are relevant for a given node-depth, without having to
iterate past all of the irrelevant ones every time.
o Added DECLARE_COUNTED_OBJECT tags to the PathMatcher, NodePathMatcher,
StringMatcher, and StringMatcherQueue classes.
o Updated DataNode ctor to default-initialize member-variables rather
than relying on Init() to do that (since other methods could get called
before Init() gets called, in some cases)
o Removed the deprecated constant PR_NAME_SET_QUIETLY. (Use the
SETDATANODE_FLAG_QUIET SetDataNodeFlag instead)
o Modified a number of Ref-returning methods to return (const Ref &)
instead, for better performance and so that they can be called inline
without causing clang-tidy to worry about potential use-after-free issues.
o Modified the PointerAndBits class to hold a real pointer and not a
uintptr when the -DMUSCLE_AVOID_TAGGED_POINTERS compiler-flag is set.
o Moved the va_list property out of the LogCallbackArgs class and into
a separate argument to LogCallback::Log(), so that we don't have to
deal with va_list's weird restrictions regarding object-lifetimes.
o Removed all setter methods from LogCallbackArgs class to make it immutable.
o Changed the Set*() methods in SysLog.h to return void instead of status_t.
* Fixed a number of warnings reported by clang-tidy.
9.40 - Released 6/24/2024
- Added a MUSCLE_STATIC_ASSERT_ARRAY_LENGTH macro to support/MuscleSupport.h
so that array declarations can error out at compile time if they don't
contain the expected number of values.
- Added a DECLARE_LABELLED_BITCHORD_FLAGS_TYPE macro to support/BitChord.h
so that BitChord::ToString() can return human-readable bit-labels if desired.
- Added GetBitLabel() and ParseBitLabel() methods to the BitChord class.
- DefaultConsoleLogger now checks for a MUSCLE_LOG_TO_STDERR environment
variable on startup, and if one is present, it will force all Log()
and LogTime() output to stderr. This is useful in cases where the
parsing of the "logtostderr" command line argument doesn't happen
soon enough to prevent all output to stdout.
- Added GetCenter() and CenterTo() methods to the Rect class.
- Added | operators to the Rect class that take a Point as an argument.
- Added a Rect::IsRational() method.
o Renamed the non-const x() and y() methods of the Point class to
SetX()/SetY(), to better match the style of the other classes.
o Added GetX() and GetY() methods to the point class, for consistency.
o Renamed Rect::Width() to Rect::GetWidth()
o Renamed Rect::Height() to Rect::GetHeight()
o Renamed Rect::IntegerWidth() to Rect::GetWidthAsInteger()
o Renamed Rect::IntegerHeight() to Rect::GetHeightAsInteger()
* Updated PointerAndBits.h to disable tagged-pointers on 32-bit systems,
since we can't guarantee that a heap-pointer's high bit won't be
legitimately set for heap objects on those systems.
* Changed the windows implementation of muscleSprintf() to use the
templated inline function used on other OS's, as the old macro-based
implementation wasn't playing nice with explicit namespaces prefixes.
* Changed the implementation of muscleFopen() to use inline functions
instead of macros for better namespace behavior.
* Changed the implementation of muscleStrcpy() to use templates
to enforce memory-safery, instead of just being a macro.
* Added a work-around to Hashtable.h to avoid a spurious compile-time
error regarding std::atomic under MSVC2017 and earlier.
* Fixed handling of the head=numbytes argument in the snoopsharedmem tool.
9.37 - Released 5/2/2024
- Implemented the ustar extension in TarFileWriter to support file paths
and linked-file paths up to 256 characters in length.
- Implemented the pax extension in TarFileWriter to support file paths
and linked-file paths of unlimited length.
- Added CPut*() convenience methods to the Python Message class.
- Updated the snoopsharedmem to use more sophisticated argument parsing.
- Updated the snoopsharedmem to have "delay=N" and "clear" options.
- Added a GetThreadPriorityName() convenience-method to the Thread class.
- Added a MUSCLE_AVOID_THREAD_PRIORITIES flag that can be added to the
compile-line to turn all set-thread-priority calls into no-ops.
- Added SetThreadScheduler()/GetThreadScheduler()/GetThreadSchedulerName()
methods to the Thread class to support Linux's SCHED_FIFO, etc.
o Updated the Python2 and Python3 message.py classes so that GetFieldItem()
and the Get*() methods now take an optional (defaultValue) argument that
specifies what should be returned if the requested item is not present
in the Message.
o Removed the option for MUSCLE_NODISCARD macro to expand to
__attribute__((warn_unused_result)) under pre-C++17 codebases,
as that implementation warns even when an explicit (void) cast
is employed, causing too much visual noise to be useful.
o Replaced calls to newnothrow with calls to new, to simplify the
code given fact that in modern OS's newnothrow's successful return
doesn't actually mean the RAM is available anyway.
- Added RoundUp() versions of all the TimeUnitConversion functions
(e.g. added MicrosToMillisRoundUp() to complement MicrosToMillis())
* Modified the MUSCLE_USE_POLL and MUSCLE_USE_EPOLL implementations of
SocketMultiplexer to round up to the nearest millisecond when computing
timeout-times (instead of rounding down, since slightly-early-wakeups
are worse than slightly-late-wakeups)
9.36 - Released 3/6/2024
- Added GetMostRecentInputTimeStamp() and GetMostRecentOutputTimeStamp()
methods to the AbstractReflectSession class
- Added a GetMostRecentAcceptTimeStamp() method to the
ReflectSessionFactory class.
- Added a GetAcceptCount() method to the ReflectSessionFactory class.
- PrintSessionsInfo() now includes text describing how recently
each session has sent or received data.
- PrintFactoriesInfo() now includes text describing how recently
each factory has accepted an incoming TCP connection, and how
many connections the factory has received so far.
- Added a GetClientDescriptionString() virtual method to the
AbstractReflectSession class to support more-useful debug output.
- Added a GetSocketBindAddress() function to NetworkUtilityFunctions.h
for querying where a socket is bound to on the local machine.
o Renamed GetPeerIPAddress() to GetPeerAddress(), and changed it
to return an IPAddressAndPort instead of returning an IPAddress
and also using a separate (optPort) argument.
o Tweaked zlib/zlib/zconf.h so that the gzlib files can build
successfully even if ./configure wasn't called in the
zlib/zlib folder first.
o SocketMultiplexer::RegisterSocket() now emits an error message
to the log if a file descriptor is too large to pass to FD_SET().
* Updated build instructions to specify cmake instead of
Visual Studio
9.35 - Released 2/14/2024
- Added an optional (optRunAsUser) argument to the various
process launch methods in ChildProcessDataIO.
- Added convenience constructors to the IPAddress class
that take an in_addr or in6_addr as an argument.
- Added convenience constructors to the IPAddressAndPort class
that take a sockaddr_in or sockaddr_in6 as an argument.
- Added WriteToInAddr() and WriteToIn6Addr() convenience
methods to the IPAddress class.
- Added WriteToSockAddrIn() and WriteToSockAddrIn6()
convenience methods to the IPAddressAndPort class.
- Added convenience overloads of the SendDataUDP() and
ReceiveDataUDP() functions that take an IPAddressAndPort
as their source/destination argument.
- Added method IPAddress::IsIPv6LinkLocal().
o Changed ChildProcessDataIO::ChildProcessReadyToRun() to
be protected instead of public.
o Removed ip_address typedef; use IPAddress instead.
o Tweaked Inet_NtoA() so that when called with the (preferIPv4)
flag, it will return the invalid/all-zeroes IP address string
as "" rather than "::".
* Updated TarFileWriter to handle it a little more elegantly
when a file's length changes while the tar data is being written
out to a non-seekable DataIO.
* Fixed a bug in the Ref class that would cause a NULL Ref's
status-string to be returned as "OK" rather than "NULL Ref"
* BitChord::SetByte()'s second argument was the wrong type. Fixed.
9.34 - Released 12/18/2023
- Added an optional localnicip=local.nic.ip.address argument
to hexterm, to better support sending IPv4 multicast packets.
- Added a B_SHUTTING_DOWN error code, useful for returning
from Thread::MessageReceivedFromOwner() overrides if there
isn't any real error but the internal thread is exiting on
request.
- Added a templated GetConstRefToDefaultObjectForType()
convenience function to util/RefCount.h
- Added a GetHardLinkCount() method to the FilePathInfo class.
o Modified IsRegexToken() to return false for '-', since
hyphens aren't meaningful except in the context of
"character class" regex tokens (which will get escaped anyway).
o Replaced the IsHosed() and SetHosed() methods of the
AbstractMessageIOGateway class with more descriptive methods
GetUnrecoverableErrorStatus() and SetUnrecoverableErrorStatus().
9.33 - Released 10/30/2023
- Added FromHexString() and FromBinaryString() methods to the
BitChord class, to complement the ToHexString()
and ToBinaryString() methods.
- Added a Queue::IsIndexValid(uint32) convenience-method.
- Updated the Queue::Remove*() methods to use std::move()
when possible.
- Updated the Hashtable::Remove*() methods to use std::move()
when possible.
- Added IsAtStart() and IsAtEnd() convenience-methods to the
HashtableIterator class.
- The snoopsharedmem tool now support an optional (maxBytesToPrint)
argument, in case you only want to see the header of the region.
o Removed obsolete references to TARGET_PLATFORM_XENOMAI.
o Updated the captive zlib library to the current GitHub version,
to avoid "function declaration without a prototype is deprecated"
compiler warnings.
* Fixed the LogTime() and LogPlain() macros so that they compile
when called from a different namespace.
* Changed ImmutableHashtablePool::GetWithAux() to repurpose an
existing table (if possible) while adding an item, as well
as when removing one.
9.32 - Released 9/8/2023
- Added a -DWITH_HELGRIND option to CMakeLists.txt to enable
causality annotations in the reference-counting of RefCount.h
so that helgrind doesn't give false-positive warnings when
analyzing an execution of this code for race conditions.
- Added MUSCLE_CONSTEXPR tag to trivial constructors and methods
of various POD-like utility classes.
- Added MUSCLE_CONSTEXPR_17 macro, for places where a constexpr
tag is useful but only allowed in C++17 or later.
o Updated PythonUtilityFunctions.h to use a forward-declaration
instead of #include-ing Python.h directly, to avoid potential
namespace-collisions between Python and Qt.
* Applied fixes for various minor issues flagged by pvs-studio-analyzer.
* Changed SignalMultiplexer's received-signal-counters to be
AtomicCounters rather than uint32 to avoid helgrind complaints
when a signal is handled.
* The ObjectPool constructor now calls GetDefaultObjectForType()
on its object-type and the associated Ref-types, to ensure that
the static singleton is initialized while the process is still
in a single-threaded state.
* IsMessageDeflated() now takes a ConstMessageRef rather than MessageRef.
* Fixed a pointer-type-mismatch issue that could cause unnecessary
compile-time errors in the templated version of Hashtable::Remove()
9.31 - Released 6/14/2023
- Added an IsFileOpen() method to the GZDataIO class.
- Modified the Hashtable class so that HashtableIterators
are only registered in the iterators-list if they are actually
pointing at a valid HashtableEntry.
- ParseConnectArg() and IPAddressAndPort::SetFromString() now support
an alternate port-syntax that doesn't require brackets, to get around
osascript's command-parsing limitations. E.g. you can now specify
"::1_port_1234" instead of "[::1]:1234"
- Added convenience PODHashFunctor specializations (for QSize,
QPoint, and QRect) to QMuscleSupport.h
o Increased the Snooze64() time in testatomicvalue's writer thread
to 10mS as it appears that 1mS snoozes were being rounded down to zero.
o Added MUSCLE_NODISCARD tag to the String and IPAddressAndPort classes.
o Increased the default value of AtomicValue's ATOMIC_BUFFER_SIZE
template argument to 8.
* Fixed code that was passing NULL as an argument to %s in printf() or
LogTime(). Thanks to Ruurd Adema for pointing out that doing that is
undefined behavior.
* Changed Hashtable::_iteratorThreadID to be a std::atomic<> to
avoid potential undefined behavior in multithreaded scenarios.
* Fixed AtomicValue class to use bitmasks instead of modulo and
only support powers-of-two array sizes.
* Fixed the handling of InterlockedCompareExchange()'s return value
in the AtomicValue class.
9.30 - Released 4/28/2023
- Tagged the constructor of the MutexGuard class (and friends) as
MUSCLE_NODISCARD so the compiler will warm about anonymous guards.
- Tagged ObjectPool::ObtainObject() with MUSCLE_NODISCARD.
- Added MUSCLE_NODISCARD to all the functions and methods that it
wouldn't make sense to call without examining their return value.
- Added MUSCLE_NODISCARD to various concrete classes (String,
Queue, Hashtable, IPAddress, etc) that shouldn't be ignored when
used as return values.
o Renamed String::Append() to String::WithAppend().
o Renamed String::Prepend() to String::WithPrepend().
o Renamed String::AppendWord() to String::WithAppendedWord().
o Renamed String::PrependWord() to String::WithPrependedWord().
o Renamed String::Trim() to String::Trimmed().
o Renamed String::Pad() to String::PaddedBy().
o Renamed String::Indent() to String::IndentedBy().
o Removed DEFAULT_MUSCLE_ROUTING_FLAGS_BIT_CHORD, and rewrote
the routing flags to use the BitChord class.
o Rewrote testnagle.cpp to include a unit-test for automated testing.
o Updated function declarations in regex captive library to avoid
compiler warnings.
o Updated the unit tests so none of them takes more than 5 seconds
to complete when done as part of a CMake "make test" pass.
* Fixed logic error in testgateway.cpp.
* MUSCLE_NODISCARD is now defined as a no-op when compiling C code,
to avoid breaking the build under C compilers that say they support
C23 but nevertheless don't grok [[nodiscard]] yet.
9.25 - Released 4/7/2023
- Rewrote String::WithReplacements(const Hashtable<String,String> &)
to only scan the input string once, instead of once per key.
- Added a String::Replace(const Hashtable<String,String> &) method.
- Added a ReplaceAllItems() convenience-method to the Queue class.
- Added MUSCLE_NO_DISCARD keyword, and applied it to the Ref and
ConstRef classes and to the status_t and io_status_t types, so that
calls ignoring these return values will generate compile-time warnings.
- Added a TruncateToLength() convenience method to the ByteBuffer class.
- Added a PR_NAME_KEEPALIVE_INTERVAL_SECONDS parameter so clients can
tell muscled to send a PR_RESULT_NOOP every (so many) seconds to
verify TCP connectivity on an otherwise idle connection.
- DefaultFileLogger now calls GetFileAttributeA() on the log file (at
most once per second) in order to get Windows to update the log file's
file-size entry in a semi-timely manner.
o Removed DataIO::GetReadByteTimeStamp() as it wasn't being used.
o CloseSocket() now prints an error message if its call to close() fails.
* GetProcessMemoryUsage() now returns more accurate values.
* Fixed a number of broken hyperlinks in the MUSCLE-by-example mkdocs.
9.24 - Release 3/20/2023
- Added a CMakePresets.json file for quick specification of minimal
(i.e. library-only) or full (i.e. including unit-tests) builds.
- Added a CMAKEOPTIONS.txt file to describe the options available
for building MUSCLE via cmake.
o Moved the non-unit-test executables out of the "test" folder
and into their own new/separate "tools" folder.
o Renamed BUILDOPTIONS.txt to COMPILEROPTIONS.txt
* Modified AbstractReflectSession::Reconnect() to not fail
if CreateDefaultSocket() return a NULL reference.
* The Python3 implementation of message.py wasn't encoding
non-ASCII utf8 strings correctly when flattening a Message. Fixed.
* ZLibCodec::Inflate() would fail when inflating a compressed
zero-byte buffer. Fixed.
9.23 - Release 2/24/2023
- Added a -DWITH_THREAD_SANITIZER=ON option to the CMakeLists.txt.
- Added a -DMUSCLE_NUM_RESERVED_HIGH_BITS_IN_POINTERS flag to specify
how many of the most-significant-bits of a pointer are reserved for
system use. This value defaults to 16 for 64-bit Android systems
(to account for Android's MTE feature) and to 0 on everything else.
- Added a _registeredSubscribersMutex to the ICallbackMechanism class
so that it can handle unusual dispatching cases more gracefully.
- Added a runtests.sh script to tests folder. This script can be
run to quickly execute all tests and report any detected regressions.
- Added add_test() directives to test/CMakeLists.txt to enable CTest.
o Renamed -DMUSCLE_AVOID_BITSTUFFING to -DMUSCLE_AVOID_TAGGED_POINTERS
since the latter is a more commonly-used term.
o Changed the default setting of the WITH_TESTS option to OFF
in CMakeLists.txt
* GetNetworkInterfaceinfos() is now implemented for Android
(API level 24 or later).
* SharedMemory.cpp now compiles under Android (pre API level 26)
although its methods will return B_UNIMPLEMENTED if called.
* GetNetworkInterfaceInfos() now returns B_UNIMPLEMENTED when
called from an OS that it doesn't have an implementation for.
* Applied some Android build fixes as suggested by Ruurd Adema.
* SetFileLogLevel() was broken. Fixed.
* Avoid including sem.h when MUSCLE_FAKE_SHARED_MEMORY is defined.
* Fixed a minor bug where the socket's assigned network interface
index might not get restored when after sending a zero-byte
multicast UDP packet.
9.22 - Released 2/2/2023
- Modified Queue::InternalizeIndex() to use subtraction
instead of modulo, for a 3x efficiency gain.
- Added a MUSCLE_NOEXCEPT keyword that expands to noexcept
under C++11 or later, or to nothing under C++03
- Added MUSCLE_NOEXCEPT tags to the SwapContents() methods
and move-constructors/operators that can make that guarantee.
- Added a MatchesNodeNameQueryFilter class, to support query
filtering against DataNode-names.
- Added DataNode::SetNodeName()
- Added a WITH_IPV6=OFF option to the CMakeLists.txt for
easier building of MUSCLE in IPv4-only mode.
- Added a "shareport" argument to hexterm to enable UDP port-sharing.
- Added an IsBroadcast() method to the IPAddress class.
- Added GetStatus() and SetStatus() methods to the
Ref/ConstRef/DummyRef/DummyConstRef classes, so that when they
are returned in a NULL state they can tell you why they aren't set.
- Added BooleansToBitChord() convenience-functions to PointerAndBits.h
- Updated PointerAndBits to be able to use the high bit in a
pointer as well as the low bit(s).
- Updated the captive zlib library to v1.2.13.
o Replaced the PointerAndBool.h header (and class) with a new
PointerAndBits.h header (and class) that does the same thing,
but in a simpler, more generalized fashion.
* Fixed broken UDP support in hexterm when -DMUSCLE_AVOID_IPV6
was set as a compiler-flag.
* Renamed SOCKET_FAMILY_IPV6 to SOCKET_FAMILY_IPV6_IS_DISABLED
when -DMUSCLE_AVOID_IPV6 is set, to avoid potential runtime bugs.
9.21 - Released 1/13/2023
- Added @tparam Doxygen tags for any template-arguments that
the calling code might need to specify explicitly.
- Enabled tagfile generation in muscle.dox.
- Added a DataIO::ReadFullyUpTo() convenience-method to handle
reading (up to n) bytes or (until EOF), whichever comes first.
- Added error code B_END_OF_STREAM to allow Read()-type methods
to unambiguously specify that the reason they are returning an
error is because they have reached EOF/EOS.
o Changed DataIO::ReadFully() and DataIO::WriteFully() to
return status_t instead of uint32.
o Removed the C APIs from the Doxygen output.
o Auto-updated the muscle.dox file to the latest Doxygen version.
* Fixed several issues to make Doxygen's output more useful.
* Fixed some compiler warnings in the captive regex library.
* Fixed the namespacing of the DoxyTemplates header so that
Doxygen generation works with the newest Doxygen version.
* Updated a number of out-of-date Doxygen comments.
9.20 - Released 12/30/2022
- Updated NetworkUtilityFunctions.cpp to better support "real"
IPv4 sockets (previously it assumed that IPv4 traffic would
be handled using IPv6 sockets and IPv4-mapped IPv6 addresses,
but that approach doesn't give 100% compatibility in all cases)
- Added a GetSocketFamily() method to the Socket class.
- Added an optional (socketFamily) argument to CreateUDPSocket().
- Added IsOK(io_status_t &) and IsError(io_status_t &) method
overrides to the io_status_t class.
- hexterm now instantiates a genuine IPv4 socket for use with
IPv4 multicast traffic.
- Tweaked gz*.c includes to compile without a configuration step.
- Added input-data-timestamping (including a PR_NAME_DATA_TIMESTAMP
field and SetReceiveTimestampingEnabled() and
GetReceiveTimestampingEnabled() methods) to the
RawDataMessageIOGateway class.
- Added SetLogLevelThreshold() and GetLogLevelThreshold() arguments
to the LogCallback class so that any LogCallback can now specify
what log-levels it is (or is not) interested in.
- Added templated overloads of Message::FindFlat(), Message::FindTag()
Message::GetFlat(), and Message::GetTag() that take any type of Ref
as an argument, so calling code no longer has to pass in a generic
RefCountableRef or FlatCountableRef and then do the necessary
downcasting separately afterward.
- Message::FindTag() now takes a ConstRefCountableRef as an
argument rather than a RefCountableRef, for better flexibility.
- Added templated overloads of Message::AddFlat(), PrependFlat(),
ReplaceFlat(), AddTag(), PrependTag(), and ReplaceTag() so that
the calling code no longer has to do manual upcasting of typed
FlatCountableRef or RefCountableRef objects before calling them.
- Added ConstMessageRef overloads of InflateMessage() and DeflateMessage().
- Added a ConstMessageRef-returning overload of Message::FindMessage().
o Removed the ByteBufferRef-specific *Flat() methods from
the Message class, since we now have more general templatized
methods that offer the same semantics for any type.
o SocketMultiplexer::WaitForEvents() now returns an io_status_t
rather than an int, for better error-reporting.
o Merged the IPv6 and IPv4 versions of AddSocketToMulticastGroup()
and RemoveSocketFromMulticastGroup() so that a single implementation
can work on either type of socket.
o Renamed SetSocketMulticastSendInterfaceAddress() and
GetSocketMulticastSendInterfaceAddress() to
SetIPv4SocketMulticastSendInterfaceAddress() and
GetIPv4SocketMulticastSendInterfaceAddress(), respectively,
and made them available even when -DMUSCLE_AVOID_IPV6 isn't set.
o Renamed Log() to LogPlain().
o Made LogTime() and LogPlain() into macros so that their arguments
will not be evaluated unless the logging-threshold-test passes.
o Improved error reporting in the ReflectServer event-loop.
o Removed the functions from TimeUnitConversions.h that take
(struct timeval &) as their argument, since they weren't being used.
o Removed SetConsoleLogLevel() and GetConsoleLogLevel() from the
DefaultConsoleLogger class, in favor of the new equivalent methods
in the LogCallback base class.
o Removed SetFileLogLevel() and GetFileLogLevel() from the
DefaultFileLogger class, in favor of the new equivalent methods
in the LogCallback base class.
o Renamed muscle's private namespaces to muscle_private.
o Replaced long with int32 in some I/O support functions.
o The default ByteBufferPool now clears the IMemoryAllocationStrategy
field of any ByteBuffer it recycles (after freeing its memory),
to avoid polluting the pool with user-installed strategies.
o Ref::SetFromRefCountableRef() now returns B_TYPE_MISMATCH on failure
rather than B_BAD_ARGUMENT.
o Removed the two-argument ConstRef and Ref "pseudo-constuctors"
and added instead a DowncastTo<SubclassRefType>() method, to
make Ref-downcasting operations self-documenting.
o Changed ITraversalPruner::MatchPath() and CreateObjectFromArchiveMessage()
to take ConstMessageRef as an argument rather than MessageRef.
o Changed StorageReflectSession::SetDataNode(), InsertOrderedData(),
InsertOrderedChildNode(), and GetNewDataNode() to take
ConstMessageRef as an argument rather than MessageRef.
o Changed DataNode to hold a ConstMessageRef rather than a MessageRef.
o Changed StorageReflectSession::NotifySubscribersThatNodeChanged()
and StorageReflectSession::NodeChanged() to pass a ConstMessageRef
rather than a MessageRef.
o ByteBuffer::ReleaseBuffer() now returns (uint8 *) instead of
(const uint8 *).
* Fixed MLOG_ON_ERROR and friends to be usable with io_status_t.
* ExpandLocalhostAddress() no longer expands IPv6 loopback addresses.
* UDPSocketDataIO::ReadFrom() would call SetSourceOfLastReadPacket()
even when no packet had been read, clearing that field. Fixed.
* Some functions in MuscleSupport.h were unintentionally being
declared outside the muscle namespace. Fixed.
9.10 - Released 12/10/2022
- Rewrote the non-Windows implementation of muscleSprintf()
to call vsnprintf() instead of sprintf(), to avoid compiler
warnings about sprintf() being insecure.
- Instrumented the non-Windows implementation of muscleSprintf()
with MUSCLE_PRINTF_ARGS_ANNOTATION_PREFIX so that the compiler
will warn about calls to muscleSprintf() with the wrong format
specifiers.
- Added an io_status_t class to represent the result of an I/O
operation. An io_status_t contains both a status_t and an
int32 byte-count.
- Added a MUSCLE-by-example page for the status_t class.
- Added MTALLY_BYTES_OR_RETURN_ON_IO_ERROR() and
MTALLY_BYTES_OR_RETURN_ON_IO_ERROR_OR_BREAK() macros to
MuscleSupport.h.
o Changed the return-types of the NetworkUtilityFunctions that
previously returned (int32/byte-count-or-negative-1), aka
SendData(), ReceiveData(), SendDataUDP(), ReceiveDataUDP(),
ReadData(), and WriteData() to return a more informative
io_status_t instead.
o Changed the DataIO::Read() and DataIO::Write() methods to
return io_status_t instead of int32.
o Changed the PacketDataIO::ReadFrom() and PacketDataIO::WriteTo()
methods to return io_status_t instead of int32.
o Simplified the implementation of GetDefaultObjectForType() back
to one that compile under any version of C++. We'll rely on
the optimizer to do the right thing, rather than SFINAE.
o Modified Directory::SetDir() to return a static status_t value
rather than B_ERRNO, to avoid potential static-initialization
ordering problems on pre-C++11 compilers.
o tagged status_t as a MUSCLE_FINAL_CLASS.
o Replaced the MAKETYPE(x) macro with a MakeWhatCode() function.
* Updated message_transceiver_thread.py to catch and ignore any
EAGAIN exceptions generated by send() on a notification-socket.
* Fixed a spurious assertion failure in SimulatedMulticastDataIO.
* Changed some code to return B_IO_ERROR instead of B_ERRNO if
fread() or fwrite() fails, since those functions are not
guaranteed to set errno when they fail.
* Fixed a bug that would cause GetEnvironmentVariableValue() to
sometimes return garbage strings under Windows if the environment
variable did not exist.
* Added missing Doxygen parameter documentation for various
macros declared in MuscleSupport.h.
* Fixed a number of broken hyperlinks in the MUSCLE-by-example docs.
9.01 - Released 11/18/2022
- Added a WritePaddingBytesToAlignTo(uint32 alignSize)
convenience-method to the CheckedDataFlattenerHelper
and DataFlattenerHelper classes.
- Added a SeekPastPaddingBytesToAlignTo(uint32 alignSize)
convenience-method to the DataUnflattenerHelper class.
- Added DataUnflattener ctor and SetBuffer() calls that
take a ByteBufferRef, for convenience.
- Added a GetEnvironmentVariableValue() convenience function,
to avoid calling getenv() directly from user code.
- Added %p (aka process ID) to the set of tokens expanded by
HumanReadableTimeValues::ExpandTokens().
- DefaultFileLogger::EnsureLogFileCreated() now tries a little
harder: if it can't create a log file with the given file name,
it will try up to 10 variants of the file name in the hopes
of coming up with a file name that is unique and can be created.
- Added a IsBitIndexValid() convenience-method to the BitChord class.
- Added MUSCLE_CONSTEXPR_OR_CONST macro to expand to "constexpr"
if possible, or "const" otherwise.
- GetDefaultObjectForType() now uses constexpr to avoid on-demand
initialization, when -DMUSCLE_USE_CPLUSPLUS17 is defined.
- CMakeLists.txt now automatically specifies -DMUSCLE_USE_PTHREADS
if building on POSIX for C++03, and WITH_THREADS is ON.
- LogTime() calls now emit printf-style format-usage warnings
when compiled with g++ or clang++.
- Added INT16_FORMAT_SPEC_* macros, for completeness.
o PODSwapper now calls std::swap() rather than reimplementing it.
* Moved the definitions of the B_* error-codes out of SetupSystem.cpp
and into MuscleSupport.h, so that Clang's Static Analyzer can see
what values they contain and generate better output.
* Generation of the random number that %r expands to is now
actually random (not just calling rand()) (in C++11 or newer).
* Renamed several of the longer mkdocs examples folder names
to avoid hitting Windows' 260-character path limit.
* Fixed a potential uninitialized-memory-read in the String
class's GetLevenshteinDistance() method.
* Fixed the CMakeList.txt files in the sub-folders to use
the inherited CMAKE_CXX_STANDARD setting rather than
forcing C++11.
* GetCurrentThreadID() is no longer compiled if
-DMUSCLE_SINGLE_THREAD_ONLY is specified.
9.00 - Released 10/27/2022
- Added a MUSCLE_MAXIMUM_NODE_DEPTH constant that limits
how deep the MUSCLE node-tree may become, to prevent
stack-overflow attacks. Defaults to 100.
- Added DataFlattener and DataUnflattener classes to
allow for safer flattening/unflattening of data
to/from byte-buffers.
- Added an UncheckedDataUnflattener class, for better
efficiency when the calling code has already done its
own bounds-checking.
- Added a CheckedDataUnflattener class, for better
calling code that wants to use a dynamically-growing
output buffer.
- Added support/EndianConverter.h to allow templating
over big/little/native endian-encoding strategies.
- Added pages for DataFlattener and DataUnflattener
APIs to the muscle-by-example documentation.
- Adding -DMUSCLE_USE_BIG_ENDIAN_DATA_FOR_EVERYTHING
to your compile line will tell MUSCLE to use big-endian
data format for all of its data. Note that doing so will
break interoperability with all existing MUSCLE builds!
- Adding -DMUSCLE_USE_NATIVE_ENDIAN_DATA_FOR_EVERYTHING
to your compile line will tell MUSCLE to use native-endian
data format for all of its data. Note that doing so will
break compatibility with different-endian CPUs!
o Changed the PseudoFlattenable::Flatten() and
Flattenable::Flatten() methods to take a second
argument (flatSize) for better runtime error-checking.
o Changed the PseudoFlattenable::Unflatten() and
Flattenable::Unflatten() methods to take a
(DataUnflattener &) as an argument rather than
a raw pointer, for better caller/callee cooperation.
o Changed Message::TemplatedFlatten() to use
a DataFlattener as an argument.
o Changed Message::TemplatedUnflatten() to use
a DataUnflattener as an argument.
o Removed the SetEndianFlag(), Append*(), Write*(),
Read*() methods from the ByteBuffer class. Use
the new DataFlattener/DataUnflattener classes instead.
o Refactored the StringTokenizer class's constructors to
take a single (optSepChars) argument instead of separate
arguments for hard and soft separator characters.
o Made the calculation of DataNode depths more efficient.
o Removed Flattenable::WriteData() and Flattenable::ReadData()
methods (since DataFlattener/DataUnflattener do it better).
o Replaced most calls to B_LENDIAN_*_TO_HOST() and
B_HOST_TO_LENDIAN_*() with calls to DefaultEndianConverter's
Import() and Export() methods, to allow MUSCLE to be built
in big-endian mode.
o Changed the PseudoFlattenable class to be templatized, and
added methods to it so all the helper methods declared in
the Flattenable interface are also available in the
PseudoFlattenable interface.
o Refactored the ZLib-support classes in muscle/zlib so that they
no longer include any zlib-headers from their header files.
* Modified Snooze64() to call clock_nanosleep() under Linux,
and to call nanosleep() when -DMUSCLE_USE_LIBRT is defined.
* Changed all the #include "zlib/zlib/zlib.h" directives to
#include "zlib.h" to avoid using the captive zlib headers
together with any system-supplied zlib implementation (which
might be different)
* Fixed a bug that could cause ZLibDataIO::WriteAux() to
to into an infinite recursion if zlib's deflate() errored out.
* Fixed a bug in MessageIOGateway that could cause it fail
to report how many bytes it had sent or received, if an
I/O error occurred later on in the same call to DoInput()
or DoOutput().
8.62 - Released 9/22/2022
- Added a Hashtable::ComputeInvertedTable() convenience-method.
- Added a Hashtable::ComputeValuesHistogram() convenience-method.
- Updated server/Makefile and test/Makefile to compile Universal
binaries under MacOS/X, if the BUILD_UNIVERSAL_BINARIES environment
variable is set.
- Updated the captive zlib library to v1.2.12.
o Rewrote Hashtable::InsertIterationEntryInOrder() to be simpler and
more efficient in most cases.
* Hashtable::Clear() wasn't updating registered HashtableIterators
properly. Fixed.
* python3/message.py was calling deprecated method array.fromstring()
when it should be calledin array.frombytes(). Fixed.
* python3/message.Flatten() now handles it properly when passed a
string as a raw data-item.
8.61 - Released 8/2/2022
- Added a GetMTU() method to the NetworkInterfaceInfo class.
- Added a BitChord::WithBitSetTo() convenience method.
- Added a snoopsharedmem program to the tests folder.
- Added an erasesharedmem program to the tests folder.
- Improved the error codes returned by methods in the SharedMemory class.
- GetSystemPath(SYSTEM_PATH_USERHOME) now falls back to calling
getpwuid() on POSIX systems, if the getenv("HOME") approach fails.
- Added a WaitConditionCallbackMechanism utility class.
- Added an AtomicValue class to support lock-free variable-sharing.
- Added a SpinLock class.
- Added a PR_RESULT_NOOP code to the enum in StorageReflectConstants.h
- Added testatomicvalue.cpp to test/verify the AtomicValue class.
o Calling Write() on a UDPSocketDataIO with zero destinations no
longer results in an error-return; rather the data is discarded and
Write() returns success.
o Updated copyright notices at the tops of files.
o Removed trailing spaces from all source files.
o Suppressed a compiler warning when compiling with OpenSSL support enabled.
o Modified Queue::InsertItemAt() and Queue::InsertItemsAt() to
allow insert-positions greater than the size of the Queue. Calls
like that will append the item(s) to the end of the Queue.
* Added psapi.lib to Qt .pro files for Windows, so Qt programs can link.
* Fixed the Makefile in tests to compile testsharedmem by default.
* Added some missing build-executable directives to tests/CMakeLists.txt.
8.60 - Released 5/28/2022
- Added a WaitCondition class for easy Wait()/Notify() functionality.
- Updated the Thread class to use a WaitCondition object as a fallback
if (useMessagingSockets) is passed to the constructor as false.
- Added WITH_CPLUSPLUS11=OFF and WITH_CPLUSPLUS17=ON options to the
CMakeLists.txt file.
- Added a WITH_PTHREADS=ON option to the CMakeLists.txt file.
- Added B_IO_READY to the set of declared status_t error-values.
- Added example programs and documentation for the new WaitCondition
class to the muscle-by-example folder.
o Updated Thread::WaitForNextMessageFromOwner(),
Thread::GetNextReplyFromInternalThread(), and MessageTransceiverThread::
GetNextEventFromInternalThread() to return status_t instead of int32.
o Rephrased the message printed when the crash-signal-handler executes.
o Swapped the ordering of arguments to the Thread class's constructor.
* Added code to JUCECallbackMechanism::handleAsyncUpdate() to work around
a bug(?) in JUCE where handleAsyncUpdate() could be called re-entrantly
in certain circumstances.
* qt_muscled_browser's "connected_at" field was being generated using
the wrong clock (GetRunTime64() instead of GetCurrentTime64()). Fixed.
* Fixed a bug in StorageReflectSession::NodeChanged() that could cause
subscription-results to be returned upon the creation of nodes that
should have been filtered out by the subscription's QueryFilter.
8.52 - Released 4/7/2022
- Added testtar.cpp to the tests folder to test the TarFileWriter class.
- Added a assertion-check in the ThreadSetupSystem constructor
to make sure it is being declared in the main thread.
- Added a assertion-check in the CompleteSetupSystem destructor to make
sure all declared CompleteSetupSystems are destroyed in LIFO order.
o Removed the (useGZip) argument from the ZLibDataIO constructors and
instead created a separate GZLibDataIO subclass to instantiate
when .gz-compatible output is desired.
o Updated muscle.dox to suit Doxygen 1.9.3's taste.
* CompleteSetupSystem's initial-memory-usage value is now set only
by the first instance of CompleteSetupSystem.
* sizeof(ReflectServer) and sizeof(MessageTransceiverThread) no longer
change depending on whether MUSCLE_ENABLE_SSL is defined or not.
* sizeof(MessageIOGateway) and sizeof(MiniPacketTunnelIOGateway) no
longer change depending on whether MUSCLE_ENABLE_ZLIB_ENCODING is
defined or not.
* Fixed a bug in ZLibDataIO.cpp that could cause deflated data not to
be fully written out to the child DataIO object in some cases.
* Fixed a race condition that could cause Thread::SetThreadPriority()
to occasionally fail with a "no such process" message.
* Fixed some #ifdefs in SetupSystem.h and ThreadLocalStorage.h that
assumed that MUSCLE_USE_PTHREADS and MUSCLE_USE_CPLUSPLUS11THREADS
defines were mutually exclusive, when they aren't.
* Updated various programs in the tests directory to still compile
(with reduced functionality) even if MUSCLE_ENABLE_ZLIB_ENCODING
isn't specified.
* Fixed #include path in Win32FileHandleDataIO.cpp
8.51 - Released 3/15/2022
- Added a SetConsoleLogToStderr(bool) to make it easier to direct
LogTime()'s output to stderr rather than stdout if desired.
- Added a "logtostderr" option for HandleStandardDaemonArgs() to
detect and call SetConsoleLogToStderr(true) in response to.
- Added support/Archivable.h as an abstract interface to represent
an object that can have SetFromArchive() and SaveToArchive()
called on it.
- Added an optional second argument to the ZLibDataIO constructor
that allows it to handle .gz-file-format-compatible data.
- Added "zlib" and "gzip" flag-arguments to hexterm.
o Updated TarFileWriter class to be RefCountable
o ZLibDataIO now subclasses DataIO rather than ProxyDataIO, since
it isn't actually seekable or packetizable.
o Fixed several deprecation-warnings when compiling under MacOS12.
o QueryFilter now subclasses Archivable.
* Updated PseudoFlattenable methods in the BitChord class to
be static rather than const, so they can be called without
an instance.
* Fixed a regression that would cause MessageTransceiverThread to
fail to connect an outgoing session if the session's target
was specified via hostname-string instead of IPAddressAndPort.
* Removed the default-value for the template-argument of
ImmutableHashtablePool::DropAllCacheEntriesContainingAnyOfTheseKeys()
since it's unnecessary and ancient (C++03) compilers don't like it.
8.50 - Released 1/31/2022
- Added two-argument versions of the GetAndMoveToFront() and
GetAndMoveToBack() methods in the Hashtable class.
o muscleSwap() now calls through to std::swap() when possible.
o Modified various method-calls (e.g. AddNewConnectSession(),
Connect(), ConnectAsync()) that took an IPAddress and a port
as separate arguments to take an IPAdddressAndPort argument instead.
o Removed AbstractReflectSession::GetAsyncConnectIP() and
AbstractReflectSession::GetAsyncConnectPort(). Call
AbstractReflectSession::GetAsyncConnectDestination() instead.
o Replaced setMargin() with setContentsMargins() in the Qt examples.
* Made the IPAddress single-argument-String constructor explicit.
* Fixed a bug in the iOS implementation of DetectNetworkConfigChangesSession
that could cause crashes during shutdown.
* Fixed a bug in Hashtable::HasKeysInCommonWith() that would
cause it to infinitely recurse if the two tables were the same size.
* Fixed a bug in Message::ReplaceFlat() that would cause it to
add incorrect data to the Message if the field didn't already exist.
8.46 - Released 1/8/2022
- Added HashCode() methods to the ByteBuffer, Queue, Hashtable,
FilePathInfo, muscle_thread_id, and PointerAndBool classes.
- Added a CalculateHashCode() function that takes an array
as an argument and returns a hash code for the entire array.
- Rewrote the deadlock-finder's lock-logging code to use
a finite amount of RAM rather than an ever-growing amount.
- Added PrintMutexLockingReport() to print out out the current
state of the -DMUSCLE_ENABLE_DEADLOCK_FINDER debug-info
without having to exit the process.
- Added ToHexString() and ToAnnotatedHexString() methods to
the ByteBuffer class.
- Added a suppressLeadingZeroes argument to BitChord::ToHexString()
- Added a MaxCacheableTableSize template-argument to the
ImmutableHashtable classes.
- Added logic to the ImmutableHashtable class to mutate a table
in some circumstances (when nobody will notice) to avoid
creating a lot of superfluous interim tables.
- Added a Hashtable::HasKeysInCommonWith() convenience method.
- Added a DropAllCacheEntriesContainingAnyOfTheseKeys() method
to the ImmutableHashtablePool class, for better efficiency.
- Hashtable::Remove() and Hashtable::Intersect() methods are
now templated so their argument can be a Hashtable of a
different type (as long as its KeyType is the same)
o CalculateHashCode(const Type &) now calls HashCode() on the
argument if possible, or uses a PODHashFunctor otherwise.
o Downgraded cmake_minimum_required in the CMakeList.txt files
to 2.8.12, in order to regain compatibility with older build
environments
o Replaced instances of MutexGuard objects manually being
placed on the stack with DECLARE_MUTEXGUARD() macro invocations,
for better code-safety and deadlock-finder compatibility.
o MutexGuard now triggers a crash if its call to Lock() or
Unlock() its Mutex fails.
o Removed MutexGuard::IsMutexLocked() since it is no longer
possible for that method to return false.
o Added a Mutex::GetNativeMutexImplementation() method for
accessing the Mutex class's back-end directly, if necessary.
o Removed deadlockfinder.cpp because its functionality is
built in to the core MUSCLE library now.
o Refactored various status_t returning code to use
MRETURN_ON_ERROR macro instead of manual status-variable
management, for better readability.
o Moved various trivial functions out of MiscUtilityFunctions.cpp
and into SetupSystem.cpp, to reduce linking dependencies.
* Refactored the Mutex class so that the code associated with
the -DMUSCLE_ENABLE_DEADLOCK_FINDER deadlock-finding feature
integrates better with TryLock() and the MutexGuard class.
* Updated DECLARE_MUTEXGUARD to explicitly specify the muscle
namespace, so it can be used from other namespaces also.
* AutoChooseHashFunctor's explicit instantiations neglected
to declare the Type field as public. Fixed.
8.45 - Released 12/21/2021
- Added a GetSessionsByIDNumber() method to the ReflectServer
and ServerComponent clases, for session-lookup with uint32 key.
o DataNodeSubscribersTable now uses uint32 keys instead of
String keys, for better efficiency.
o Inlined some trivial functions in the ReflectServer class.
o Changed the Python 2 code to use xrange() instead of range().
* Fixed the Windows implementation of the Directory class
to work correctly in 64-bit builds.
* Fixed various MSVC2022 warnings in the muscle-by-example code.
* Fixed several race conditions reported by ThreadSanitizer.
* DummyRef and DummyConstRef constructors now inherent the
IsRefCounting() parameter of their Ref argument verbatim,
to avoid bugs introduced by implicit-constructor insertion.
* Updated the PointerAndBool classes to hold their internal
state as a (uintptr) instead of a (T*), to avoid any
potential undefined behavior that might arise from holding a
non-aligned object-pointer.
8.44 - Released 11/17/2021
- Added new methods ObjectPool::PerformSanityCheck() and
AbstractObjectRecycler::GlobalPerformSanityCheck() to make
it easier to detect memory-corruption issues in the future.
- Improved the robustness of the SimulatedMulticastDataIO's
distributed-ping algorithm.
- Added a templated Arg(const T &) method to the String class
so that you can pass a reference to any object with a
ToString() method and it will call ToString() on the object
implicitly.
- Added templated + and += operators for the String class,
so you can append an object with a ToString() method without
having to explicitly call ToString() on it.
* Merged in Kreeblah's FreeBSD 13.0 compatibility fixes.
* Fixed a bug in Queue::Clear() that allowed the Queue to remain
un-normalized in some cases after Clear() returned. This bug
could in turn cause Message::Unflatten() to corrupt memory.
* Fixed an MSVC warning in GlobalMemoryAllocator.h about strdup()
8.43 - Released 10/25/2021
- Added BitChord::GetNumBitsSet() method.
- Added a Message::SortDataInField() method.
- Added HasBufferedIncomingText() method to PlainTextMessageIOGateway
- Added a Hashtable::SwapWithTable() method for swapping a key/value pair.
- Added a Message::SwapName() method for swapping a named field.
- The CMakeLists.txt file now supports a WITH_SSL=ON option to
compile the muscle library with OpenSSL support enabled.
- Added a second constructor to FileDataIO to allow the call to
fopen() to be deferred until the first time the calling code
tries to use the FileDataIO's I/O methods.
- Added a muscleStrdup() function, for convenience.
- Added an optional (escapeChar) argument to the StringTokenizer
class constructors, to allow specifying an escape-character
that can be inserted before separator-chars that are intended
to be interpreted as literals.
- StringTokenizer class now uses a bit-chord lookup rather than
strchr() when determining if a character is a separator-char.