configure(): large finite projection planes pass validation but overflow the lens
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- computer-graphics
Línea de trabajo
Start with nftRuntimeSettingsValid() in NFTRuntimeSettings.h, then read arglCameraFrustumRH() in lib/SRC/AR/paramGL.c to understand which plane calculations can overflow. Find the existing settings or lens tests and add coverage for large finite planes; done means configure() rejects the unsafe values instead of returning success with a non-finite lens.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
nftRuntimeSettingsValid() (NFTRuntimeSettings.h) accepts any planes that are finite and ordered (nearPlane > 0, farPlane > nearPlane). The lens is then built by arglCameraFrustumRH() (lib/SRC/AR/paramGL.c), which computes depth terms from far + near, near - far and 2 * far * near.
With very large finite planes, for example near = 1e200 and far = 1e300, the product overflows. configure() returns success, yet the camera lens holds inf or NaN entries. When ARdouble is float (ARDOUBLE_IS_FLOAT), the overflow starts much sooner, from about far * near > 3.4e38.
Impact
Low. No realistic AR configuration uses such planes; the defaults are 0.1 and 1000. Still, configure() promises to reject what it cannot honour (D7 of the design), and here it reports success and leaves an unusable projection matrix.
Proposed fix
Choose one:
- In
nftRuntimeSettingsValid(), check thatfar + near,near - farand2 * far * nearare finite inARdoublebefore accepting the planes. - Or add a generous upper bound to
farPlane, documented in the D7 range comment.
Add a test with large finite planes that pass validation today and produce a non-finite lens.
Found in the Qodo review of #109 (release 0.12.0). The code came in with #106.
- Lenguaje dominante
- C++
- Estrellas
- 21
- Forks
- 8
- Merge medio
- 3 h 42 min
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webarkit/WebARKitLib
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
webarkit/WebARKitLib#131 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
webarkit/WebARKitLib#114 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
webarkit/WebARKitLib#107 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
webarkit/WebARKitLib#130 ·
Los mantenedores suelen responder en 1 día
-
build: native build fails with GCC 15 (ubuntu-26.04): implicit fopen64 in vendored ioapi.cPosiblemente ocupada @kalwalt la tomó hace 6 días. Abiertobug CI
webarkit/WebARKitLib#118 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de webarkit/WebARKitLib
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
itinance/react-native-fs#1270 ·
-
clang:frontend clang:openmp crash
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
llvm/llvm-project#245442 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
ai_p1 comp-sql-syntax
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
ClickHouse/ClickHouse#133888 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-2 días Aptitud para principiantes 65/100