Skip to content

Conversation

@joransiu
Copy link
Contributor

@joransiu joransiu commented Jul 17, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

deps

Description of change

Original commit message:

S390:Update inline asm constraint in test-platform
The GetStackPointer() routine in test-platform uses an inline
assembly code to store the current stack pointer value into a static
variable sp_addr. The existing asm code for S390 uses an ST/STG
instruction, with the memory operand associated with the general ('=g')
constraint to sp_addr.

On GCC 4.8.5, the GCC compiler got confused and treated sp_addr as
an integer operand instead of memory operand, resulting in a store
being emitted that writes to an invalid meory location.

Given the specific store instructions being inlined here, we should
restict the sp_addr operand to explicitly be a memory operand using '=m'
instead of '=g'.

R=bmeurer@chromium.org,jkummerow@chormium.org,rmcilroy@chromium.org,yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2158523002
Cr-Commit-Position: refs/heads/master@{#37809}

Fixes: #7659

@nodejs-github-bot nodejs-github-bot added the v8 engine Issues and PRs related to the V8 dependency. label Jul 17, 2016
@addaleax
Copy link
Member

LGTM

/cc @nodejs/v8

@bnoordhuis
Copy link
Member

LGTM but can you bump the patchlevel in deps/v8/include/v8-version.h and request backports to the 5.2 and 5.3 branches?

@ofrobots
Copy link
Contributor

LGTM once patchlevel is updated.

@joransiu
Copy link
Contributor Author

Thanks for the reviews. I've updated the patch level. Will also request backports to 5.2/5.3 as well.

@mhdawson
Copy link
Member

LGTM

@mhdawson
Copy link
Member

mhdawson commented Jul 18, 2016

Not sure how earlier builds were launched but here are ones that seem to be working:

https://ci.nodejs.org/job/node-test-commit-v8-linux/209/
https://ci.nodejs.org/job/node-test-pull-request/3329/

@mhdawson mhdawson self-assigned this Jul 18, 2016
@mhdawson
Copy link
Member

CI runs green.

@mhdawson
Copy link
Member

Going to land now.

@mhdawson
Copy link
Member

Unfortunately it does not seem to apply. Can you rebase.

@bnoordhuis
Copy link
Member

@mhdawson Conflict in v8-version.h, right? Just reset to HEAD and bump the patchlevel yourself.

Original commit message: S390:Update inline asm constraint in test-platform The GetStackPointer() routine in test-platform uses an inline assembly code to store the current stack pointer value into a static variable sp_addr. The existing asm code for S390 uses an ST/STG instruction, with the memory operand associated with the general ('=g') constraint to sp_addr. On GCC 4.8.5, the GCC compiler got confused and treated sp_addr as an integer operand instead of memory operand, resulting in a store being emitted that writes to an invalid meory location. Given the specific store instructions being inlined here, we should restict the sp_addr operand to explicitly be a memory operand using '=m' instead of '=g'. R=bmeurer@chromium.org,jkummerow@chormium.org,rmcilroy@chromium.org,yangguo@chromium.org BUG= Review-Url: https://codereview.chromium.org/2158523002 Cr-Commit-Position: refs/heads/master@{nodejs#37809} Fixes: nodejs#7659
@joransiu
Copy link
Contributor Author

@mhdawson I rebased and bumped up the patch level.

@mhdawson
Copy link
Member

Ah ok, but joran beat me to it landing now.

@mhdawson
Copy link
Member

Landed as f56cd32

@mhdawson mhdawson closed this Jul 19, 2016
mhdawson pushed a commit that referenced this pull request Jul 19, 2016
Original commit message: S390:Update inline asm constraint in test-platform The GetStackPointer() routine in test-platform uses an inline assembly code to store the current stack pointer value into a static variable sp_addr. The existing asm code for S390 uses an ST/STG instruction, with the memory operand associated with the general ('=g') constraint to sp_addr. On GCC 4.8.5, the GCC compiler got confused and treated sp_addr as an integer operand instead of memory operand, resulting in a store being emitted that writes to an invalid meory location. Given the specific store instructions being inlined here, we should restict the sp_addr operand to explicitly be a memory operand using '=m' instead of '=g'. R=bmeurer@chromium.org,jkummerow@chormium.org,rmcilroy@chromium.org,yangguo@chromium.org BUG= Review-Url: https://codereview.chromium.org/2158523002 Cr-Commit-Position: refs/heads/master@{#37809} Fixes: #7659 PR-URL: #7771 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
@evanlucas
Copy link
Contributor

Does this need to be backported to v6.x?

@joransiu
Copy link
Contributor Author

@evanlucas No. This fix is S390 specific; v6.x is still using V8 5.0, which doesn't have full S390 support. Unless V8 5.1 lands there....

@targos
Copy link
Member

targos commented Jul 21, 2016

@joransiu Could you do the backport request ? Can you please post a link to the related V8 bug here ?

@joransiu
Copy link
Contributor Author

Here's the issue tracking the V8 backports (to 5.2 / 5.3). https://bugs.chromium.org/p/v8/issues/detail?id=5225

@joransiu
Copy link
Contributor Author

The fix has been backported to V8 5.2 / 5.3.

targos pushed a commit to targos/node that referenced this pull request Jul 26, 2016
Original commit message: S390:Update inline asm constraint in test-platform The GetStackPointer() routine in test-platform uses an inline assembly code to store the current stack pointer value into a static variable sp_addr. The existing asm code for S390 uses an ST/STG instruction, with the memory operand associated with the general ('=g') constraint to sp_addr. On GCC 4.8.5, the GCC compiler got confused and treated sp_addr as an integer operand instead of memory operand, resulting in a store being emitted that writes to an invalid meory location. Given the specific store instructions being inlined here, we should restict the sp_addr operand to explicitly be a memory operand using '=m' instead of '=g'. R=bmeurer@chromium.org,jkummerow@chormium.org,rmcilroy@chromium.org,yangguo@chromium.org BUG= Review-Url: https://codereview.chromium.org/2158523002 Cr-Commit-Position: refs/heads/master@{nodejs#37809} Fixes: nodejs#7659 PR-URL: nodejs#7771 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
ofrobots pushed a commit to ofrobots/node that referenced this pull request Aug 25, 2016
Original commit message: S390:Update inline asm constraint in test-platform The GetStackPointer() routine in test-platform uses an inline assembly code to store the current stack pointer value into a static variable sp_addr. The existing asm code for S390 uses an ST/STG instruction, with the memory operand associated with the general ('=g') constraint to sp_addr. On GCC 4.8.5, the GCC compiler got confused and treated sp_addr as an integer operand instead of memory operand, resulting in a store being emitted that writes to an invalid meory location. Given the specific store instructions being inlined here, we should restict the sp_addr operand to explicitly be a memory operand using '=m' instead of '=g'. R=bmeurer@chromium.org,jkummerow@chormium.org,rmcilroy@chromium.org,yangguo@chromium.org BUG= Review-Url: https://codereview.chromium.org/2158523002 Cr-Commit-Position: refs/heads/master@{nodejs#37809} Fixes: nodejs#7659 PR-URL: nodejs#7771 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v8 engine Issues and PRs related to the V8 dependency.

9 participants