Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Keep track of last known memory pointer in a region in DSG and use it for error trapping #8

Open
rowleya opened this issue Sep 27, 2016 · 1 comment
Milestone

Comments

@rowleya
Copy link
Member

rowleya commented Sep 27, 2016

It is, in general, impossible for DSG to know if a region will overflow during DSE, since the code might have for loops etc. However, it could have a general idea as follows:

  1. Keep track of the last known write position for each region
  2. Update the last known write position whenever the pointer is set to an absolute value, a write is called or a write array is called.
  3. Raise an error if the last known write position is beyond the end of the region.

This should work reasonably well, although I am still not sure it is flawless... only testing would tell!

@dkfellows
Copy link
Member

Nobody uses looping in DSE, and never did; it was never supported. Given that all writes are basically linear fills within a region (albeit not always generated in order into those regions), we most definitely can know if writes go out of where they should.

The DSE definitely checks whether writes are within their region. It's a check that's done immediately before the update of the raw region data, in both the Python and Java versions. Nothing will ever actually be written to memory except into a region (or to the region metadata, of course). We've never observed such a failure to date, so I'm not worried to work on this.

@dkfellows dkfellows modified the milestones: 7.0.0, Bluesky May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants