v2.7.0 - many bug fixes, enhancements and connection tags

8 views
Skip to first unread message

Kyle

unread,
May 24, 2026, 1:47:17 AM (3 days ago) May 24
to libplctag

New Features:

  • Create tags from existing tags. plc_tag_create_from_tag().
  • Connection tags: A new tag type that reports connection state transitions (up/down/reconnecting) as callback events. Supports tag-from-tag creation (cloning a connection tag from an existing data tag) and optional IO events (read/write started/completed).
  • Connection state events: Connection status changes are now delivered as new callback events. Duplicate events are folded.
  • Slot 16 support. Some ControlLogix chassis have more slots with slot indexes up to 16.
  • Experimental fiber-based AB and Modbus servers.
  • Minor version bump: Reflects the new public API surface.

Bug Fixes (mostly Omron):

  • Exponential backoff on Omron reconnection (now same as AB).
  • Omron teardown ordering. Caused SISEGV and possible hangs. Possible fix for 625
  • Race condition on tag removal: Removing a tag could set the terminate flag on its connection while the refcount was still non-zero, causing a subsequent data tag to attach to an already-terminating connection.
  • Request ref-count race: rc_dec(req) was called before abort_request, creating a window where the request could be freed while still being used. Fixed ordering. Possible fix for 625
  • Request leak race: A race in the path that removes a request from a tag could cause a leak.
  • Spin-block fall-through: Missing rc != PLCTAG_STATUS_OK check could allow execution to continue incorrectly.
  • Wrong pthread clock base: CLOCK_MONOTONIC was used where CLOCK_REALTIME is required by pthread_cond_timedwait. Also fixed reversed success/failure status checks in the macOS locking wrappers.
  • Integer type / format string issues: "%lld" and (long long) casts caused warnings and incorrect behavior on 32-bit Linux and musl.

Build / CI Fixes

  • 32-bit x86 support (Windows MinGW and Linux). Edge case fixes.
  • MSVC compatibility fix (max_align_t in stddef.h).
  • GCC 16+ C++ static linking workaround. Fixes build on Fedora 44 628
  • Various MinGW/MSYS2 path and shell quoting fixes.
  • Modbus server startup race (bind() before SO_REUSEADDR) and kill/restart timing fixed
    in test scripts.
Thanks to all the users who provided feedback in the form of bugs and feature requests!

The "experimental" tag has come off of the new debugging API functions.  I was experimenting with providing those early with an experimental warning.  The experiment did not work.  It was confusing to users.

The release can be found here.

Have fun!

P.S. I will be doing updates to the wiki pages.  Some are already updated, but there is more to come.

Reply all
Reply to author
Forward
0 new messages