Limiting script execution time reliably
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
Línea de trabajo
The issue asks for a reliable way to cap script run time in the Lua VM, and the thread proposes setting a timeout on the VM before a pcall, since debug.sethook polling can be blocked by C calls. Read the thread to see which approaches were already weighed. Done would mean a settled design, agreed with maintainers, before any code is written.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I'm struggling to find a good solution to implementing a reliable mechanism to limit how long a script is allowed to run.
A lot of examples show using debug.sethook to check if a timer has elapsed every 100k instructions or so but this is not that reliable as a C call can block.
Another solution is to use alarm system call or setrlimit on lua in a new thread/process but that has its own set of drawbacks.
Has a script timeout been considered before as something we can set on the VM before executing a pcall?
- Lenguaje dominante
- Go
- Estrellas
- 3.5k
- Forks
- 217
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 Shopify/go-lua
-
Numeric modulo fast path disagrees with Lua 5.2 and the library fallback for negative operandsPosiblemente ocupada @efegokdemir la tomó hace 35 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
io.write discards spaces after trailing numbersPosiblemente ocupada @flynn-eye la tomó hace 25 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
State.close leaves closed upvalues in the open list, so calls get slower without boundPosiblemente ocupada @efegokdemir la tomó hace 17 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de Shopify/go-lua
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
limitlessprojects/Go-Hybrid#4764 ·
Los mantenedores suelen responder en 1 día
-
[bug]: lint fails on main, generated CLI docs out of datePosiblemente ocupada @bupd la tomó hoy. Abiertobug documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
goharbor/harbor-cli#1180 ·
Los mantenedores suelen responder en 1 día
-
crane: mutate --env adds duplicate PATH on Windows images when key case differsPosiblemente ocupada @aad1tyaaaaa la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
google/go-containerregistry#2523 ·
Los mantenedores suelen responder en 4 días
-
bosh_io_stemcell_type: regular does not work for noble and resolute as it adds -go_agent as suffixAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
cloudfoundry/bosh-deployment-resource#138 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100