Summary#
외부 입력이 배열 인덱스나 텐서 크기에 사용되면, 계산 이후의 검사만으로는 음수 인덱스나 정수 오버플로를 막지 못할 수 있다. 값을 사용하기 전에 하한과 상한을 모두 검증하고, 경계값을 회귀 테스트에 포함하라.
Problem#
음수 풀링 시퀀스 값은 범위 밖 읽기를, 지나치게 큰 num_segments는 출력 크기 계산의 오버플로와 프로세스 중단을 일으켰다.
Solution#
인덱스·할당 크기 계산에 들어가는 입력의 허용 범위를 먼저 확인하고, 음수와 극단적으로 큰 값을 각각 테스트한다.
Failure Modes#
- 상한만 검사해 음수 인덱스를 놓침
- 크기를 계산한 뒤 검사해 이미 오버플로가 발생함
Sources#
- https://github.com/tensorflow/tensorflow/pull/127664
- https://github.com/tensorflow/tensorflow/pull/127785
- https://github.com/tensorflow/tensorflow/pull/127507
- https://github.com/tensorflow/tensorflow/pull/126911
- https://github.com/tensorflow/tensorflow/pull/127985
- https://github.com/tensorflow/tensorflow/pull/128008
- https://github.com/tensorflow/tensorflow/pull/127339
- https://github.com/tensorflow/tensorflow/pull/128014
- https://github.com/tensorflow/tensorflow/pull/120176
- https://github.com/tensorflow/tensorflow/pull/128009
- https://github.com/huggingface/transformers/pull/49124
- https://github.com/huggingface/transformers/pull/49084
- https://github.com/huggingface/transformers/pull/49097
- https://github.com/huggingface/transformers/pull/49044
- https://github.com/huggingface/transformers/pull/49082
- https://github.com/huggingface/transformers/pull/49067
- https://github.com/huggingface/transformers/pull/49068
- https://github.com/huggingface/transformers/pull/49076
- https://github.com/huggingface/transformers/pull/47789
- https://github.com/ClickHouse/ClickHouse/pull/113987
- https://github.com/ClickHouse/ClickHouse/pull/112952
- https://github.com/ClickHouse/ClickHouse/pull/121096
- https://github.com/ClickHouse/ClickHouse/pull/110957
- https://github.com/ClickHouse/ClickHouse/pull/119182
- https://github.com/ClickHouse/ClickHouse/pull/113344
- https://github.com/ClickHouse/ClickHouse/pull/110394
- https://github.com/ClickHouse/ClickHouse/pull/109115
- https://github.com/ClickHouse/ClickHouse/pull/117968
- https://github.com/ClickHouse/ClickHouse/pull/122458
- https://github.com/ClickHouse/ClickHouse/pull/122363
- https://github.com/ClickHouse/ClickHouse/pull/122343
- https://github.com/ClickHouse/ClickHouse/pull/120520
- https://github.com/ClickHouse/ClickHouse/pull/109004
- https://github.com/rustfs/rustfs/pull/8147
- https://github.com/rustfs/rustfs/pull/8146
- https://github.com/rustfs/rustfs/pull/8144
- https://github.com/rustfs/rustfs/pull/8143
- https://github.com/rustfs/rustfs/pull/8114
- https://github.com/rustfs/rustfs/pull/8099
- https://github.com/rustfs/rustfs/pull/8096
- https://github.com/rustfs/rustfs/pull/8140
- https://github.com/rustfs/rustfs/pull/8137
- https://github.com/rustfs/rustfs/pull/8139
- https://github.com/rustfs/rustfs/pull/8118
- https://github.com/rustfs/rustfs/pull/8120
- https://github.com/rustfs/rustfs/pull/8136
- https://github.com/rustfs/rustfs/pull/8133
- mined_at: 2026-09-27T02:58:36Z
Sagwan Revalidation 2026-09-27T03:38:19Z#
- verdict:
ok - note: 인덱스·크기 계산 전 입력 범위 검증은 여전히 유효하며, 본문에 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-01T09:04:24Z#
- verdict:
ok - note: 사용 전 범위 검증과 경계값 테스트 권고는 여전히 유효하며, 본문에 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-04T04:21:19Z#
- verdict:
ok - note: 계산 전 입력 범위 검증과 경계값 테스트 권고는 여전히 유효하며, 본문에 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-07T05:33:57Z#
- verdict:
ok - note: 사용 전 범위 검증과 경계값 테스트는 여전히 유효하며, 본문에 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-10T02:39:26Z#
- verdict:
ok - note: 계산 전 입력 범위 검증과 경계값 테스트 권고는 여전히 유효하며, 본문에 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-12T21:38:18Z#
- verdict:
ok - note: 계산 전 입력 범위 검증과 경계값 테스트 권고는 여전히 유효하며, 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-15T17:19:58Z#
- verdict:
ok - note: 인덱스·크기 계산 전 범위 검증과 경계값 테스트는 여전히 유효한 권장안이다.
Sagwan Revalidation 2026-10-18T13:48:32Z#
- verdict:
ok - note: 인덱스·크기 계산 전 범위 검증과 경계값 테스트 권장은 여전히 유효하다.