OLD | NEW |
---|---|
1 ======================== | 1 ======================== |
2 PNaCl Undefined Behavior | 2 PNaCl Undefined Behavior |
3 ======================== | 3 ======================== |
4 | 4 |
5 .. contents:: | 5 .. contents:: |
6 :local: | 6 :local: |
7 :backlinks: none | 7 :backlinks: none |
8 :depth: 3 | 8 :depth: 3 |
9 | 9 |
10 .. _undefined_behavior: | 10 .. _undefined_behavior: |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 could mandate flush-to-zero, and may give an API to enable denormals | 170 could mandate flush-to-zero, and may give an API to enable denormals |
171 in a future release. The latter is problematic for SIMD and | 171 in a future release. The latter is problematic for SIMD and |
172 vectorization support, where some platforms do not support denormal | 172 vectorization support, where some platforms do not support denormal |
173 SIMD operations. | 173 SIMD operations. |
174 * ``NaN`` values are currently not guaranteed to be canonical; see `bug | 174 * ``NaN`` values are currently not guaranteed to be canonical; see `bug |
175 3536 <https://code.google.com/p/nativeclient/issues/detail?id=3536>`_. | 175 3536 <https://code.google.com/p/nativeclient/issues/detail?id=3536>`_. |
176 * Passing ``NaN`` to STL functions (the math is defined, but the | 176 * Passing ``NaN`` to STL functions (the math is defined, but the |
177 function implementation isn't, e.g. ``std::min`` and ``std::max``), is | 177 function implementation isn't, e.g. ``std::min`` and ``std::max``), is |
178 well-defined in the *pexe*. | 178 well-defined in the *pexe*. |
179 | 179 |
180 SIMD Vectors | |
181 ^^^^^^^^^^^^ | |
182 | |
183 SIMD vector instructions aren't specified by the C/C++ standard and as | |
184 such their behavior isn't specified at all in C/C++, it is usually left | |
Derek Schuff
2014/04/24 16:06:20
maybe "SIMD vector types aren't included in the C/
JF
2014/04/24 16:16:30
Done. I went for "part of the C/C++ standards".
| |
185 up to the target architecture to specify behavior. Portable Native | |
186 Client instead exposed :ref:`Portable SIMD Vectors | |
187 <portable_simd_vectors>` and offers the same guarantees on these vectors | |
188 as the guarantees offered by the contained elements. Of notable interest | |
189 amongst these guarantees are those of alignment for load/store | |
190 instructions on vectors: they have the same alignment restriction as the | |
191 contained elements. | |
192 | |
180 Hard to Fix | 193 Hard to Fix |
181 ^^^^^^^^^^^ | 194 ^^^^^^^^^^^ |
182 | 195 |
183 * Null pointer/reference has behavior determined by the NaCl sandbox: | 196 * Null pointer/reference has behavior determined by the NaCl sandbox: |
184 | 197 |
185 * Raises a segmentation fault in the bottom ``64KiB`` bytes on all | 198 * Raises a segmentation fault in the bottom ``64KiB`` bytes on all |
186 platforms, and on some sandboxes there are further non-writable | 199 platforms, and on some sandboxes there are further non-writable |
187 pages after the initial ``64KiB``. | 200 pages after the initial ``64KiB``. |
188 * Negative offsets aren't handled consistently on all platforms: | 201 * Negative offsets aren't handled consistently on all platforms: |
189 x86-64 and ARM will wrap around to the stack (because they mask the | 202 x86-64 and ARM will wrap around to the stack (because they mask the |
(...skipping 22 matching lines...) Expand all Loading... | |
212 * PNaCl could offer "portable" JIT capabilities where the code hands | 225 * PNaCl could offer "portable" JIT capabilities where the code hands |
213 PNaCl some form of LLVM IR, which PNaCl then JIT-compiles. | 226 PNaCl some form of LLVM IR, which PNaCl then JIT-compiles. |
214 | 227 |
215 * Out-of-scope variable usage: will produce unknown data, mostly | 228 * Out-of-scope variable usage: will produce unknown data, mostly |
216 dependent on stack and memory allocation. | 229 dependent on stack and memory allocation. |
217 * Data races: any two operations that conflict (target overlapping | 230 * Data races: any two operations that conflict (target overlapping |
218 memory), at least one of which is a store or atomic read-modify-write, | 231 memory), at least one of which is a store or atomic read-modify-write, |
219 and at least one of which is not atomic: this will be very dependent | 232 and at least one of which is not atomic: this will be very dependent |
220 on processor and execution sequence, see :ref:`Memory Model and | 233 on processor and execution sequence, see :ref:`Memory Model and |
221 Atomics <memory_model_and_atomics>`. | 234 Atomics <memory_model_and_atomics>`. |
OLD | NEW |