DiamondLightSource / DiamondLightSource/pythonSoftIOC

No protection against overflow/underflow when setting values

未关闭
#66 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
46
派生
15
平均合并
1 天 18 小时
30 天内合并 PR
1

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。