openjudge/sandbox — pull request #10 by liuyu81 (2013-05-06 07:54:01+00:00)
Title: Release of 0.3.5-3

This maintenance release of `libsandbox` comes with several improvements and fixes.

1. improved proc_dump() and Sandbox.dump() for error differentiation

proc_dump() can dump a memory block of specified size instead of one
machine word at at time. it has also been optimized to fail gracefully in
case of bad address or wrong alignment failures. the pythonic wrapper
returns `None` on such failures for differentiation thus resolving issue #8

2. fallback to hybrid sync/async profiling

the full asynchronous profiling introduced in 0.3.5-2 may fail to update
the resource usage of some very short tasks and leave some statistics zero.
the resumed hybrid profiling makes sure to update stat before dispatching
events and fixes issue #9

3. prevent program overrun in `trace_kill()`

certain linux kernels may leave a SIGKILLed program to overrun for a few
instructions; and the overrun may lead to undesirable side effects or even
security risk. the improved trace_kill() performs opcode flush and syscall
replacement to eliminate risky side effects.

4. refactor unittest framework to verify the fixes

the python unittest framework has been thoroughly refactored. new test cases
are included for verification and benchmarking.

5. revised sample programs to support mixed linux32/64 abi