Conversation
configure
Outdated
There was a problem hiding this comment.
options.unused_with_snapshot? Or maybe revert the rename.
There was a problem hiding this comment.
On second thought: not options.with_snapshot is probably more accurate.
There was a problem hiding this comment.
remind me, did you want me to disable snapshots by default for armv6?
There was a problem hiding this comment.
Good question. Maybe enable it, remove the warning and see what the CI says?
There was a problem hiding this comment.
The default is still to build without snapshot, right? I'm sorry, but the diff doesn't make it obvious for me.
There was a problem hiding this comment.
The new commit is to test CI and see if building/testing on armv6 w/ snapshot enabled works. It's just a test commit for the CI.
There was a problem hiding this comment.
@bnoordhuis I noticed on the CI job that there's no armv6 listed. Just armv7/8. So this config optin would be tested, right?
There was a problem hiding this comment.
pi1-raspbian-wheezy at least is armv6.
@rvagg can we get those RPis renamed at some point to follow the naming schema arch-distro-version like the rest of the CI jobs, to avoid confusion.
There was a problem hiding this comment.
@silverwind ah, thanks for pointing that out. missed that one.
|
@bnoordhuis Seems armv6 build now works w/ snapshots. I'm troubleshooting the win failures, but they're not from this PR. LGTY? (well, after the squash that is) |
|
There are two other places in configure that use |
|
This also sligthly decreases the memory usage, from ~0.8 MiB to ~0.3 MiB per an empty context. |
|
This makes building with snapshots the default again - is that intended? |
|
@piscisaureus security consideration is no longer the case with a newer v8, this is why we revert that change. |
|
For the simple repeated (async) «var x = {}; vm.createContext(x);» test RSS with this patch does not reach 1.4 GiB now (as it did before), but stays around ~700 MiB (~800 MiB peak), heapUsed does not go above 480 MiB (was at least 880 MiB without this patch). That's still not perfect, but a bit better than it was. |
|
@indutny oh, I didn't know security was "fixed". Got more info on that? (bonus point for commit link :) |
|
@jbergstroem The discussion was at the issue this pr fixes: #1631 (comment) |
faed1f3 to
eda89af
Compare
|
@bnoordhuis don't see the two places you're talking about. I see: Which is correct, since snapshot will have been enabled. And: Which I believe is still correct because |
|
Oh, I see what I missed now... It's kind of confusing because AFAIK that makes it the only option that works that way. Let me go over the PR one more time. |
configure
Outdated
There was a problem hiding this comment.
I think it would be clearer / more idiomatic if you named it 'without_snapshot' with action='store_false' (and you can drop the default=True in that case.)
There was a problem hiding this comment.
I think you meant action='store_true'. Otherwise it'll always be false.
There was a problem hiding this comment.
That is indeed what I meant. :-)
eda89af to
a455238
Compare
|
@bnoordhuis Switched the variable name, and does seem to make more sense that way. PTAL. |
configure
Outdated
There was a problem hiding this comment.
I suspect that the logic is wrong here because it will set want_separate_host_toolset = 1 when target_arch == host_arch.
There was a problem hiding this comment.
oh you're correct. I naively switched the statements. Has been fixed.
a455238 to
6979842
Compare
configure
Outdated
There was a problem hiding this comment.
This still doesn't look quite correct me. Host/target toolsetting should be enabled when cross-compiling with snapshots enabled so I think you could write this as:
cross_compiling = target_arch != host_arch
want_snapshots = not options.without_snapshot
o['variables']['want_separate_host_toolset'] = int(cross_compiling and want_snapshots)The double negation reads kind of iffy but it is what it is.
There was a problem hiding this comment.
Thanks. Had to make a white space change to fit at 80, but made the change.
Also re-enable use of snapshots for armv6. Fixes: nodejs#1631
6979842 to
61154d7
Compare
|
LGTM if the CI is happy. I would explain in the commit log that enabling snapshots is no longer a security liability. |
|
Thanks @bnoordhuis for all the reviews. Landed in 8736a8e. |
Snapshots had been previously disabled because of a security vunerability. This has been fixed (ref: #1631 (comment)) Also, re-enable snapshots for ARMv6 builds. There were previous build issues that have been fixed. Fixes: #1631 PR-URL: #1663 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
Edit: Actually landed in 36cdc7c. |
Fixes: #1631
R=@bnoordhuis