GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — v8: fix stack overflow in recursive method by bnoordhuis · Pull Request #12460 · nodejs/node Conversation
|
|
I don't expect any performance impact because this part of Crankshaft should run on the background thread anyways. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
You probably can use the list as a stack (instead of queue) and just pop the last element at the end of the loop? That would lessen the peak memory use.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Made the suggested change. I wasn't sure if walking them in a different order was sound but it computes the union so I suppose it must be. V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/653/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM. FWIW 2nd commit didn't traverse the same order as the recursion did either (BFS vs DFS). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM but is this a backport of a change in V8? or should this land upstream first?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
V8 is not likely to ship a version with this patch anymore, and Crankshaft is being deprecated, so I'm not sure how much value upstreaming has. I would give lgtm if @bnoordhuis provides a CL for upstream though. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm fine with floating it as a patch. Upstreaming it would be make-work for the both of us. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: nodejs#11991 PR-URL: nodejs#12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
|
Should this be backported to v6.x? Please apply |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@gibfahn Yes, v6.x and v4.x. The filename is deps/v8/src/hydrogen-gvn.cc in v4.x but the patch should otherwise apply cleanly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
There was an error while loading. Please reload this page.
|
Didn't apply cleanly in v4.x with the filename changed. Would you be willing to backport (assuming you think it's worth getting into a v4.x release). It's possible I messed up the patch modification of course.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: nodejs#11991 PR-URL: nodejs#12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
|
Benign conflict in the includes. v4.x PR: #13080 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: #11991 PR-URL: #12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock() used to self-recurse before this commit, causing stack overflows on systems with small stack sizes. Make it non-recursive by storing intermediate results in a heap-allocated list. Fixes: nodejs#11991 PR-URL: nodejs#12460 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.