openjudge/sandbox — pull request #11 by liuyu81 (2013-05-06 17:40:37+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

the improved 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 memory alignment failures. the
pythonic wrapper Sandbox.dump() returns `None` on such failures for
better error 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 (and thoroughly refactored) 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. release of portable testing framework

a portable test suite has been included in this release. more than 50 test
cases has been ported from the internal quality control process of libsandbox
and wrapped in python's unittest framework. the test suite serves both as
a verification tool and a comprehensive demo for libsandbox and pysandbox

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