DiamondLightSource / DiamondLightSource/pythonSoftIOC
No protection against overflow/underflow when setting values
- Vorherrschende Sprache
- Python
- Sterne
- 46
- Forks
- 15
- Ø Merge
- 1 T. 18 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
pythonSoftIOC provides no protections against overflowing data type limits.
The most obvious example of this is longIn/Out, due to the unbounded size of Python3's `int` type. No warning or error is raised if you attempt to do the following:
```
builder.longOut("TEST", initial_value=9999999999999)
```
[...]$ caget TEST
PREFIX:TEST 1316134911
The value is truncated, but no warning is given.
This issue should also investigate all other types, and consider adding validation to the incoming values before passing to EPICS.
Possibilities include ( but are not limited to):
- Huge floating point values
- Tiny floating point values
- Strings that may be silently truncated, especially when unicode is in use
- Waveforms when the value being set is longer than the NELM of the record
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Dateien, Tests oder Einstiegspunkte. Beginne damit, das Beispiel builder.longOut zu reproduzieren, und verfolge anschließend, wie Werte für die aufgeführten numerischen, String- und Waveform-Fälle an EPICS übergeben werden. Als erledigt gilt, wenn die relevanten Werte außerhalb des zulässigen Bereichs oder mit übermäßiger Größe durch eine Warnung oder einen Fehler validiert werden und die untersuchten Fälle abgedeckt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100