Repository navigation
STC-S Channel minor fixes - #122
Merged
Merged
Conversation
Generated with AI Co-Authored-By: SLAC AI
Generated with AI Co-Authored-By: SLAC AI
ReadSpaceArgs stored the upper limits of a PositionInterval under DLOLIMIT, over the lower limits, and never wrote DHILIMIT, so MakeSpaceRegion failed with AST__MPKER for every document containing one. AST writes a Box or an Interval as a PositionInterval, so it could not read its own output for those classes. Store the upper limits under DHILIMIT. test3 in teststcschan.c reads a PositionInterval and reads back the STC-S written for a Box. Generated with AI Co-Authored-By: SLAC AI
GetRegionProps tested Negated before its negated-NullRegion branch, so the only branch that writes AllSky could never be reached and a negated NullRegion was written as Not around a NullRegion, which the writer then refused. Test for the all-sky NullRegion first. test3 reads AllSky and writes it back, writes a negated NullRegion built directly, writes a Union built around one, and checks that a negated Circle still goes through Not and a plain NullRegion is still refused. Generated with AI Co-Authored-By: SLAC AI
Read formatted the Unsupported units error from a WordContext and a buffer pointer that it declared but never initialised; ReadProps had already consumed the words and freed its own context, so the message dereferenced whatever the stack held and usually crashed astRead on a valid document such as Circle ICRS 10 20 1 unit m. Name the unit alone, as every other error after ReadProps does, and remove the two declarations. test3 checks the error and its exact message for a Circle and a PositionInterval, and that arcsec still scales a Circle. Generated with AI Co-Authored-By: SLAC AI
…of crashing GetRegionProps formats the centre, limits, vertices or position of a Region into a string one axis at a time and stops at the first undefined value with a warning. It then removed the trailing space from that string, which is still NULL when the first value was undefined, so astWrite crashed instead of returning zero. Store each property only when the string holds a value, as ReadSpaceArgs already does. Found by the review of the three fixes above: astRead simplifies a TimeInterval combined with AllSky to an Interval whose spatial bounds are undefined, and writing that Region crashed. test3 writes such an Interval built directly and the Region read from that document, and expects zero objects and the undefined-lower-limit warning. Generated with AI Co-Authored-By: SLAC AI
GetRegionProps creates a KeyMap for the properties of a negated Region, stores a clone of it in the parent KeyMap, and never annulled its own pointer, so every Not sub-phrase written leaked the KeyMap and its contents. Annul it once it has been stored, as the compound-Region branch already does. Found by the review of the three fixes above: LeakSanitizer reported the leak from test3's negated Circle write. teststcschan_c now runs clean with ASAN_OPTIONS=detect_leaks=1; ctest itself runs with leak detection off, so this has no C assertion. Generated with AI Co-Authored-By: SLAC AI
…round-trip an Interval The check for a PositionInterval with fillfactor and GEOCENTER before the limits now asserts the Box bounds as well as the fill factor, since the extra words shifting the limit positions is what could mis-assign them. An Interval is written and read back alongside the Box, because the writer handles both classes in the same PositionInterval branch and the release note names both. Generated with AI Co-Authored-By: SLAC AI
Five fragments of one type for one pull request take towncrier's counter suffix, 122.serialisation.1 to .5; the README now says so. Generated with AI Co-Authored-By: SLAC AI
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #122 +/- ##
==========================================
+ Coverage 65.38% 65.50% +0.11%
==========================================
Files 85 85
Lines 98692 98699 +7
Branches 33161 33167 +6
==========================================
+ Hits 64532 64654 +122
+ Misses 17679 17566 -113
+ Partials 16481 16479 -2 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.