Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-buffer-indexof.js failing on pLinux BE #3283

Closed
mhdawson opened this issue Oct 8, 2015 · 3 comments
Closed

test-buffer-indexof.js failing on pLinux BE #3283

mhdawson opened this issue Oct 8, 2015 · 3 comments
Labels
buffer Issues and PRs related to the buffer subsystem. test Issues and PRs related to the tests.

Comments

@mhdawson
Copy link
Member

mhdawson commented Oct 8, 2015

https://ci.nodejs.org/job/iojs+pr+ppc/nodes=ppcbe-fedora20/25/console

not ok 15 test-buffer-indexof.js
#
#assert.js:89
#  throw new assert.AssertionError({
#  ^
#AssertionError: 8 == -1
#    at Object. (/home/iojs/build/workspace/iojs+pr+ppc/nodes/ppcbe-fedora20/test/parallel/test-buffer-indexof.js:117:8)
#    at Module._compile (module.js:425:26)
#    at Object.Module._extensions..js (module.js:432:10)
#    at Module.load (module.js:356:32)
#    at Function.Module._load (module.js:311:12)
#    at Function.Module.runMain (module.js:457:10)
#    at startup (node.js:134:18)
#    at node.js:961:3

Looks like test was added or modified by this PR #2539

@skomski can you take a look ?

@jasnell FYI

@mscdex mscdex added buffer Issues and PRs related to the buffer subsystem. test Issues and PRs related to the tests. labels Oct 8, 2015
@skomski
Copy link
Contributor

skomski commented Oct 8, 2015

@mhdawson Is it possible to get access to a big endian machine? string_search.h is mostly copied from v8 with some type changes and is tested on BE so most likely the problem is in IndexOfString in node_buffer.cc.

@mhdawson
Copy link
Member Author

mhdawson commented Oct 8, 2015

yes I can get you temporary access on the BE machine if you can send me your ssh public key

I sent the connection info to the email for your github account, once I get your ssh key I'll add and you'll be able to log in.

@jasnell
Copy link
Member

jasnell commented Oct 9, 2015

So far I've only been able to investigate so far, but from what I can see, I believe the issue does lie in the node_buffer.cc IndexOfString changes that were introduced by #2539. I could be off but It appears that the input string argument on the buffer.indexOf is not being properly ordered properly on BE platforms so when the search is performed, it's not finding a match.

jasnell pushed a commit that referenced this issue Oct 10, 2015
On Big Endian platforms v8 strings are need to converted
to Little Endian before searching in utf16le buffer

Fixes: #3283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ca.ibm.com>
PR-URL: #3295
Trott pushed a commit to Trott/io.js that referenced this issue Oct 12, 2015
On Big Endian platforms v8 strings are need to converted
to Little Endian before searching in utf16le buffer

Fixes: nodejs#3283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ca.ibm.com>
PR-URL: nodejs#3295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

4 participants