~yolanda.robla/ubuntu/trusty/nodejs/add_distribution

« back to all changes in this revision

Viewing changes to debian/patches/1001_align_fast_buffers_8byte_boundary.patch

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: align fast buffers on 8 byte boundary
2
 
 Fixes http://bugs.debian.org/660802
3
 
Origin: upstream,https://github.com/joyent/node/commit/285d8c65
4
 
Forwarded: not-needed
5
 
Author: Jérémy Lal <kapouer@melix.org>
6
 
Last-Update: 2012-03-29
7
 
--- a/lib/buffer.js
8
 
+++ b/lib/buffer.js
9
 
@@ -250,6 +250,7 @@
10
 
       this.parent = pool;
11
 
       this.offset = pool.used;
12
 
       pool.used += this.length;
13
 
+      if (pool.used & 7) pool.used = (pool.used + 8) & ~7;
14
 
     }
15
 
 
16
 
     // Treat array-ish objects as a byte array.