ldmud-3.2.9/doc/
ldmud-3.2.9/doc/efun/
ldmud-3.2.9/mud/
ldmud-3.2.9/mud/heaven7/
ldmud-3.2.9/mud/heaven7/lib/
ldmud-3.2.9/mud/lp-245/
ldmud-3.2.9/mud/lp-245/banish/
ldmud-3.2.9/mud/lp-245/doc/
ldmud-3.2.9/mud/lp-245/doc/examples/
ldmud-3.2.9/mud/lp-245/doc/sefun/
ldmud-3.2.9/mud/lp-245/log/
ldmud-3.2.9/mud/lp-245/obj/Go/
ldmud-3.2.9/mud/lp-245/players/lars/
ldmud-3.2.9/mud/lp-245/room/death/
ldmud-3.2.9/mud/lp-245/room/maze1/
ldmud-3.2.9/mud/lp-245/room/sub/
ldmud-3.2.9/mud/lp-245/secure/
ldmud-3.2.9/mud/morgengrauen/
ldmud-3.2.9/mud/morgengrauen/lib/
ldmud-3.2.9/mud/sticklib/
ldmud-3.2.9/mud/sticklib/src/
ldmud-3.2.9/mudlib/uni-crasher/
ldmud-3.2.9/pkg/
ldmud-3.2.9/pkg/debugger/
ldmud-3.2.9/pkg/diff/
ldmud-3.2.9/pkg/misc/
ldmud-3.2.9/src/autoconf/
ldmud-3.2.9/src/bugs/
ldmud-3.2.9/src/bugs/MudCompress/
ldmud-3.2.9/src/bugs/b-020916-files/
ldmud-3.2.9/src/bugs/doomdark/
ldmud-3.2.9/src/bugs/ferrycode/ferry/
ldmud-3.2.9/src/bugs/ferrycode/obj/
ldmud-3.2.9/src/bugs/psql/
ldmud-3.2.9/src/done/
ldmud-3.2.9/src/done/order_alist/
ldmud-3.2.9/src/done/order_alist/obj/
ldmud-3.2.9/src/done/order_alist/room/
ldmud-3.2.9/src/gcc/
ldmud-3.2.9/src/gcc/2.7.0/
ldmud-3.2.9/src/gcc/2.7.1/
ldmud-3.2.9/src/hosts/
ldmud-3.2.9/src/hosts/GnuWin32/
ldmud-3.2.9/src/hosts/amiga/NetIncl/
ldmud-3.2.9/src/hosts/amiga/NetIncl/netinet/
ldmud-3.2.9/src/hosts/amiga/NetIncl/sys/
ldmud-3.2.9/src/hosts/i386/
ldmud-3.2.9/src/hosts/msdos/byacc/
ldmud-3.2.9/src/hosts/msdos/doc/
ldmud-3.2.9/src/hosts/os2/
ldmud-3.2.9/src/hosts/win32/
ldmud-3.2.9/src/util/
ldmud-3.2.9/src/util/erq/
ldmud-3.2.9/src/util/indent/hosts/next/
ldmud-3.2.9/src/util/xerq/
ldmud-3.2.9/src/util/xerq/lpc/
ldmud-3.2.9/src/util/xerq/lpc/www/
Short: MAX_TIME is a bad idea - here is why.
From: Lars and Macbeth
Date: 990324
Type: Feature
State: Acknowledged.

(Translation of an online discussion, edited for content)

Summary:
  - it must at least be possible to temporarily turn off the real-time
    limit (see f-981229-11). This also involves something analog to
    CATCH_RESERVED_COST.
  - an alternative to MAX_TIME would be weighting the eval ticks to
    the complexity of the operation.
  - a driver-rewrite would yield an even better solution.

Note: MAX_TIME was axed in 3.2-dev.69 due to implementation problems.
The basic idea is worth considering, but an actual implementation needs
more thought.


Me: What's the problem with the hard time limit on evaluations? Amylaar
    said that it could cause security problems, but I can't imagine
    what you could do with it.

Macbeth: He's right. Even though it's quite tricky to create a useful
    exploit, you can leave security-sensitive data in inconsistent state.

Me: Like with the soft limit we already have for eval ticks?

Macbeth: Yup, but there could build in checks into the mudlib. I can't
    do that with hard time limits.

Me: Why? I seem to remember that I also made an efun returning the
    remaining time.

Macbeth: For once I'd have to adapt code in a thousand places, and second
    it is only of limited use. Limited because the real-time behaviour
    of LPC is not very predictable (to put it mildly).
    Just imagine a chain reaction of deallocations...

Macbeth: I don't like it at all from the point of security issues, and
    also for other reasons. And it doesn't really help against an endless
    loop in save_object(), for example.

Me: I understand. Nice catch22 - without it every wizard can freeze the
    mud with a simple loop.

Macbeth: I can do that whatever you do. ed for example offers thousands
    of possibilities.

Me: What 'other reasons' do you have?

Macbeth: That it isn't predictable, and that perfectly clean code can
    produce inconsistent data. Take /basic/database.c here: if one
    item becomes inconsistent, you lose the whole file.

Me: Damn. I thought a limit of 1 minute or more would be safe, but of
    course if the mud blocks on a file operation...

Macbeth: Exactly. For this you can only look at the time spent in the
    process, else the mud will crash over simple NFS problems. But then
    the limit can easily be circumvented with file operations.

Macbeth: Furthermore it's a hack. (It would be different if you would
    also give me a possibility for an atomar execution of extensive LPC
    operations, but just a function to measure the remaining time is
    not enough).

Me: Like the request to execute certain pieces of code without regard
    to the eval-tick limit?

Macbeth: Yes, but [this one would be] less critical because endless loops
    would still run into the other limit.

Macbeth: There is a _very_ elegant solution, but it involve an extensive
    rework of the driver.

Me: Tell me. Even if I can't implement it, I can at least collect ideas
    for people with more time.

Macbeth: A primitive  'atomic { ... }'. If an error occurs in the inside,
    the driver is reset to the state at the start of the primitive,
    including eval-cost errors. You know what that means.

Me: If 'state of the driver' includes the state of all objects/mappings/-
    arrays/... - Ugh.

Macbeth: Precisely. On occurance of an error, everthing is undone.

Me: No problem. I just have to find somebody who pays me for this kind
    of work ;-)

From afar, Macbeth grins at you.