DiamondLightSource / DiamondLightSource/pythonSoftIOC

No protection against overflow/underflow when setting values

Abierto
#66 5 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
46
Forks
15
Merge medio
1 d 18 h
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

The issue names no files, tests, or entry points. Start by reproducing the builder.longOut example, then trace how values are passed to EPICS for the listed numeric, string, and waveform cases. Done means the relevant out-of-range or oversized values are validated with a warning or error, with coverage for the cases investigated.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
backend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.