DiamondLightSource / DiamondLightSource/pythonSoftIOC
No protection against overflow/underflow when setting values
- Linguagem predominante
- Python
- Estrelas
- 46
- Forks
- 15
- Merge médio
- 1d 18h
- PRs com merge (30d)
- 1
Descrição
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
Guia de contribuição
Direção de pesquisa
A issue não indica arquivos, testes nem pontos de entrada. Comece reproduzindo o exemplo builder.longOut e, em seguida, rastreie como os valores são passados para EPICS nos casos numéricos, de string e de waveform listados. Considera-se concluído quando os valores relevantes fora do intervalo ou grandes demais forem validados com um aviso ou erro, com cobertura para os casos investigados.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- backend
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100