[Freeciv-Dev] [patch #1599] Scripting: Limit execution time

2010-04-10 Thread Ulrik Sverdrup

Update of patch #1599 (project freeciv):

  Status:  Ready For Test => Done   
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1599] Scripting: Limit execution time

2010-04-07 Thread Ulrik Sverdrup

Follow-up Comment #1, patch #1599 (project freeciv):

I forgot this remark: This is not a security feature. It is reportedly
possible to construct infinite loops using C library calls, and those won't
be caugth (the instructions counter does not advance).

___

Reply to this item at:

  

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1599] Scripting: Limit execution time

2010-04-07 Thread Ulrik Sverdrup

URL:
  

 Summary: Scripting: Limit execution time
 Project: Freeciv
Submitted by: englabenny
Submitted on: torsdag 2010-04-08 den 00:53
Category: general
Priority: 5 - Normal
  Status: Ready For Test
 Privacy: Public
 Assigned to: englabenny
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.2.x, 2.3.0

___

Details:

To catch infinite loops or any kind of very slow script, we can limit script
execution time. There should be something that interrupts script execution so
that it can't hang the server forever (writers of buggy scripts will be
thankful).

A lua debug hook is installed to be invoked every 1 executed lua
instructions. The limit of 5.0 seconds of CPU time is a very high limit. It
applies to all script function calls individually, including script load
time, script callback execution, etc.

Proposed for 2.2 and trunk

An easy way to make an infinite loop in lua, for testing purposes, is 'while
true do end'.



___

File Attachments:


---
Date: torsdag 2010-04-08 den 00:53  Name:
2010040801-Scripting-Limit-execution-time.patch  Size: 3 kB   By: englabenny



___

Reply to this item at:

  

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev