diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-09 18:54:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-09 18:54:24 -0700 |
commit | 0e248e6f1d7423835dffd1da72a2c29567a31e78 (patch) | |
tree | 2d0a01bf430116dec03053db37664d4769b97fd5 /src/parseTools.js | |
parent | 28a4c2a2fd9d1469a0bf17ddf7a74483da2f5aa7 (diff) |
do not attempt aligned reads/writes on illegal values
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index d0d66929..ff2f0744 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1118,7 +1118,7 @@ var asmPrintCounter = 0; // See makeSetValue function makeGetValue(ptr, pos, type, noNeedFirst, unsigned, ignore, align, noSafe, forceAsm) { if (UNALIGNED_MEMORY) align = 1; - else if (FORCE_ALIGNED_MEMORY) align = 8; + else if (FORCE_ALIGNED_MEMORY && !isIllegalType(type)) align = 8; if (isStructType(type)) { var typeData = Types.types[type]; @@ -1222,7 +1222,7 @@ function indexizeFunctions(value, type) { //! @param noNeedFirst Whether to ignore the offset in the pointer itself. function makeSetValue(ptr, pos, value, type, noNeedFirst, ignore, align, noSafe, sep, forcedAlign, forceAsm) { if (UNALIGNED_MEMORY && !forcedAlign) align = 1; - else if (FORCE_ALIGNED_MEMORY) align = 8; + else if (FORCE_ALIGNED_MEMORY && !isIllegalType(type)) align = 8; sep = sep || ';'; if (isStructType(type)) { |