From 8d946bf1e216531637f53904ea51381baafbae9f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 28 May 2015 09:39:41 -0700 Subject: Create a list of incompletely specified behavior. --- IncompletelySpecifiedBehavior.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 IncompletelySpecifiedBehavior.md (limited to 'IncompletelySpecifiedBehavior.md') diff --git a/IncompletelySpecifiedBehavior.md b/IncompletelySpecifiedBehavior.md new file mode 100644 index 0000000..f577772 --- /dev/null +++ b/IncompletelySpecifiedBehavior.md @@ -0,0 +1,21 @@ +# Incompletely Specified Behavior + +WebAssembly is a sandboxed platform. Programs can't access data outside the sandbox without going through appropriate APIs, or otherwise escape the sandbox, even if the behavior inside the sandbox should ever be unspecified in any way. + +Beyond that, it is desirable to minimize observable differences between implementations when practical, so that programs don't inadvertently become dependent on any particular implementation's behavior. However, in some areas, performance concerns make this prohibitively expensive, so some compromises are made. + +Also, there is a general preference against [nasal demons](https://en.wikipedia.org/w/index.php?title=Nasal_demons). WebAssembly generally prefers to [trap](AstSemantics.md) in many situations. Otherwise, it is generally preferred to have a specific set of possible behaviors rather than unconstrained behavior. And presently, WebAssembly has no nasal demons. + +The following is a list of the places where the WebAssembly specification currently admits or is expected to admit multiple possible behaviors. + + - [Out of bounds heap accesses](AstSemantics.md#accessing-the-heap) + + - [Environment-dependent resource limits may be exhausted](AstSemantics.md) + + - [NaN bit patterns](AstSemantics.md#floating-point-operations) + + - [Races between threads](EssentialPostV1Features.md#threads) + + - [Fixed-width SIMD may want some flexibility](EssentialPostV1Features.md#fixed-width-simd) + - In SIMD.js, floating-point values may or may not have subnormals flushed to zero. + - In SIMD.js, operations ending in "Approximation" return approximations that may vary between platforms. -- cgit v1.2.3