Last active
January 8, 2016 19:55
-
-
Save jkrems/16deb968b7a66c34a3f2 to your computer and use it in GitHub Desktop.
CLS failure on iojs >= 1.8.4 (possibly earlier)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
./configure | |
make -j4 | |
./iojs cls-failure.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var http = require('http'); | |
var assert = require('assert'); | |
var cls = require('continuation-local-storage'); | |
var ns = cls.createNamespace('minimal-cls-failure'); | |
ns.run(function() { | |
ns.set('y', 63); | |
http.get('http://api.reddit.com/r/javascript/about.json', function(res) { | |
// ns.bindEmitter(res); | |
console.log('"response"'); | |
assert.strictEqual(ns.get('y'), 63, | |
'Has the right context in "response" event'); | |
res.on('data', function() { | |
console.log('"data"'); | |
// This fails: | |
assert.strictEqual(ns.get('y'), 63, | |
'Has the right context in "data" event'); | |
}); | |
res.on('end', function() { | |
console.log('"end"'); | |
// This fails: | |
assert.strictEqual(ns.get('y'), 63, | |
'Has the right context in "end" event'); | |
console.log('ok'); | |
}); | |
}); | |
}); |
Results from git bisect
:
> git bisect log
# bad: [7b7da2edf79a95aa9ab2b7ff6dc74557d4cd0d64] 2015-04-20 io.js v1.8.1 Release
# good: [44e1f68fb66c01dfda736e4e938f241e1b2ef77d] 2015-04-14 io.js v1.7.1 Release
git bisect start 'v1.8.1' 'v1.7.1'
# good: [12e51d56c1007d83c4bc1c1450b5f45837c27164] doc: add Addon API WG
git bisect good 12e51d56c1007d83c4bc1c1450b5f45837c27164
# bad: [5b844e140b01bff010747e303c0d9e0f3a0f5514] module: fix style
git bisect bad 5b844e140b01bff010747e303c0d9e0f3a0f5514
# bad: [3ad82c335deff29a1db5a391f893dc6d2ff1e63a] module: handle NODE_PATH in require('.')
git bisect bad 3ad82c335deff29a1db5a391f893dc6d2ff1e63a
# bad: [76f219c128ea729972226c064e79f9b3aa494eff] doc: Document forced pushing with git
git bisect bad 76f219c128ea729972226c064e79f9b3aa494eff
# bad: [10e31ba56c676bdcad39ccad22ea9117733b8eb5] node: allow multiple arguments passed to nextTick
git bisect bad 10e31ba56c676bdcad39ccad22ea9117733b8eb5
# first bad commit: [10e31ba56c676bdcad39ccad22ea9117733b8eb5] node: allow multiple arguments passed to nextTick
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Possibly related toemitOne
change here: nodejs/node@b677b84Started happening between 1.7.1 and 1.8.1:
Issue: othiym23/node-continuation-local-storage#44