Robust Services Core Versions Save

Robust applications framework in C++. Includes a static analysis tool and two applications.

v0.35.1

1 year ago
  • Make the configuration file an optional command line parameter (c=<path>).
  • Change the Module constructor so that an optional module can define a symbol that allows it to be enabled.
  • Define an OptionalModules configuration parameter (a string) that specifies the optional modules to enable.
  • Enable optional modules at the bottom of NbModule::Startup.
  • Change CreateModules in main.cpp and rscapp.cpp to use the optional modules capability.

Warning

A module that is not required by another one must define a symbol when it invokes the base Module constructor, and that symbol must appear in the OptionalModules parameter in the configuration file. Each module must also override the Enable function to enable the modules that it requires, plus itself (Module::Enable). Instantiating a module is no longer sufficient to make its capabilities available; it must also be enabled for its Startup function to be invoked during initialization and restarts. See the comments in Module.h.

  • Convert each fn_name function in a template header to an inline fn_name (a C++17 capability).
  • Enhance the static analysis tool to support inline data.
  • Change how Diplomacy bot events and reconnect attempts are implemented.
  • Rename RscLauncher to Launcher.

v0.34.1

1 year ago

CodeTools

  • Add a WarningAttrs.disabled_ bool so that all occurrences of a warning can be disabled.
  • Don't automatically replace tabs with spaces after editing a file.
  • Remove line counts from the file produced by >check and add a >linecounts command to export them.

v0.34.0

1 year ago

NodeBase

  • Create src/exe directory for launching executables.
  • Move RecoveryThread to its own files.

CodeTools

  • Checks removed from Editor and made before logging FunctionCouldBeFree were forgotten for DataCouldBeFree.
  • Fix bugs when deleting C++ items.
  • Automatically preserve warnings generated during compilation if >check is re-executed.

Other

v0.33.0

1 year ago

NodeBase

  • Fix bug: exit the program instead of getting into an infinite restart loop if a trap occurs during initialization.
  • Remove Lock.h: Mutex is almost as efficient and much better for robustness and debugging.
  • Reduce object pool alarm thresholds to less than 1/16th, 1/32nd, and 1/64th of the pool's blocks being available.
  • Fix bug: SlabPriv::Validate should only validate the block at addr, instead of the entire heap, when addr != nullptr.
  • Increase the restart timeout to 20 seconds.
  • Change element.config so that each object pool starts at the default size of 1K blocks.

CodeTools

  • Add a warning for a trailing comment that is not vertically aligned with one above it.
  • Add a warning for an auto variable that should be tagged const.
  • Don't log FunctionCouldBeFree when checks in Editor prevented >fix from actually changing the function.
  • Fix bug: when a class has a function with the same name as one made static in a .cpp, the class must qualify the static function with its namespace to invoke it.
  • Fix bug: an item changed to static in a .cpp was relocated to within a class definition.

v0.32.0

1 year ago

NodeBase

  • Create a src/app directory as an alternative to modifying main.cpp when building an application with RSC.
  • Move some main.cpp code to Log and MainArgs to share code with rscapp.cpp.
  • Look for the input and help directories in the directory immediately above the src directory on the path to the executable.
  • Use EXIT_SUCCESS and EXIT_FAILURE for exit codes.

CodeTools

  • Add an option to >export to dump all code comments to a file.
  • Use the new >export option to extract comments, and then use MS Word to find and fix typos.
  • Don't log "could be const" on data or an argument whose type has two pointers/arrays or more.

v.0.31.0

1 year ago

NodeBase

  • Implement SIGWRITE on Linux.
  • Change Thread.Interrupt to require a reason for the interrupt.
  • Count the number of times a Mutex causes blocking.
  • Fix bug: spurious wakeups occur in Gate.WaitFor.
  • Fix bug: divide by zero safety net test fails on clang.
  • Fix bug: flood of stack trace requests during restarts causes heap corruption.

CodeTools

  • Support elaborated type specifiers.
  • Check that a subsequent invocation of >parse is specifying the same target.

v0.30.0

1 year ago

NodeBase

  • Support logging early during booting, before the log system has initialized.
  • If initialization is being traced, stop tracing soon after the system has booted.

CodeTools

  • Don't import the launcher directory in the script lib.create: RscLauncher also has a main(), which causes spurious warnings about removing #includes from rsc/main.cpp.
  • Log a warning when an auto variable could be inadvertently copying an object, which would be avoided by declaring it as auto&.
  • Fix some warnings where an auto variable was copying an object.
  • Fix bug: when >fix adds a special member function to a template, FindTemplateAnalog causes an "invalid vector subscript" exception because template instances don't have that member.

Other

  • Get RscLauncher working on Linux. This uncovered a VS2022 bug: hitting the enter key in the Linux Console Window, without any other input, does not cause std::getline to return with an empty string. A space must be entered first.
  • Fix some gcc and clang compiler warnings.

v0.29.0

1 year ago
  • Add a document that provides the status of trap recovery tests.
  • Rename SysFileFileSystem, SysLockLock, and SysMutexMutex.
  • Track whether a conflict has occurred on a Mutex.
  • Implement SysThread::SetPriorityAllowed to indicate whether scheduler priorities can be changed. If they can't, increase the timeslice for a locked thread if a preemptable thread is also running.
  • Add the virtual function Base::Summarize for displaying items in a tabular format.
  • Modify the following CLI commands and the classes that they display to support Summarize:
    • NbIncrement: >alarms list >buffers >daemons list >deferred >heaps list >modules >mutexes >pools >psignals >threads >tools
    • NwIncrement: >ipports >ipservices
    • SbIncrement: >contexts >events >factories >handlers >initiators >invpools >messages >msgports >parameters >protocols >psms >services >signals >ssms >states >timers >triggers

v0.28.0

1 year ago

The focus was on testing the Linux target, which now seems stable.

NodeBase

  • Implement SysFile.GetLine for erasing the \r from endlines in files created on Windows but read on Linux.
  • Rename SysThreadStack to SysStackTrace.
  • Implement SysStackTrace.Demangle targets for Linux and Windows.
  • Implement SysThread.Pause so a thread can sleep while waiting for its Thread to finish construction.
  • Implement InitThread.RunningTicks as a rough monotonic clock that doesn't advance during restarts and breakpoints.
  • Exit a thread if it has run for ~1 second and its Thread still isn't finished construction.
  • Implement SlabHeap.Validate.
  • If RootThread will not initiate a restart on a scheduling timeout, limit it to one log every 3 seconds.
  • Fix bug: create ThreadRegistry before RootThread and add some missing mutexes when accessing its threads_ member.
  • Fix bug: if the platform quickly reused a native thread identifier, the new thread with that identifier failed to start because its identifier was still registered as deleted in ThreadRegistry.threads_.
  • Fix bug: don't invoke Destroy on a Thread that is marked deleting_.

NetworkBase

  • Deleting a socket does not unblock recvfrom on Linux, so have a UdpIoThread send itself a message to unblock when it wants to exit during a restart.

CodeTools

  • Remove the SourcePath directory from the file paths in >check output and change \ separators to /: this eliminates noise in diffs when a >check obtained on Windows is compared with one obtained on Linux.
  • Fix bug: when a name refers to a function, its interim referent wasn't updated after argument matching selected the correct function.
  • Fix bug: when setting an interim referent, prefer a non-static function to a static one: this adds an implicit this argument to the function call, which is needed to match with a non-static function, but which is ignored when matching with a static function.

Known deficiencies

  • The following recovery tests fail on Linux:

    • invoking std::terminate (currently a problem in Windows release builds as well)
    • trapping while handling an exception
    • trapping in a destructor
    • Ctrl-C to interrupt a thread

    The first three are because of the gcc compiler. The last one appears to be because WSL doesn't pass a Ctrl-C to the Linux console.

  • There are minor differences between >check and >export results obtained on Windows as opposed to Linux.

  • RscLauncher still hasn't been tested on Linux.

v0.27.0

1 year ago

NodeBase

  • Implement Linux target for RscLauncher. Closes #20.
  • Fix bug: >restart reboot and >restart exit failed because exit() invokes destructors, which eventually caused problems when Debug::ft was invoked.

CodeTools

  • Fix bug: the keyword virtual should always be removed on an override.
  • Fix bug: the override tag could only be added after the virtual keyword was present so that it could be deleted.
  • Fix bug: warnings about virtual and override are detected during the compilation phase and were not preserved when the file was checked.

Known deficiencies

  • Linux targets have not yet been tested.
  • Windows bug that causes a stack overflow when trying to recover from std::terminate in a release build has been reported.