Skip to content

Alternative fix to #6468 - #6475

Closed
indutny wants to merge 2 commits into
nodejs:masterfrom
indutny:feature/alt-gh-6466
Closed

indutny wants to merge 2 commits into
nodejs:masterfrom
indutny:feature/alt-gh-6466

Conversation

@indutny

@indutny indutny commented Apr 29, 2016 •

Copy link
Copy Markdown
Member
Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

deps

Description of change

Note: this PR should not be landed until this patch will be upstreamed to the v8's trunk.

Here I propose, instead of turning off ASLR at either runtime or compile-time, export the ASLR slide in the profile data and parse it to resolve the symbols during --prof-process.

Fix: #6466

@nodejs-github-bot nodejs-github-bot added the v8 engine Issues and PRs related to the V8 dependency. label Apr 29, 2016
@indutny
indutny force-pushed the feature/alt-gh-6466 branch from 723a32c to 102d478 Compare April 29, 2016 16:33
@indutny

indutny commented Apr 29, 2016

Copy link
Copy Markdown
Member Author

cc @bnoordhuis

@indutny

indutny commented Apr 29, 2016

Copy link
Copy Markdown
Member Author

@jasnell jasnell added the wip Issues and PRs that are still a work in progress. label Apr 29, 2016
@indutny indutny added macos Issues and PRs related to the macOS platform. security Issues and PRs related to security. labels Apr 29, 2016
@ofrobots

Copy link
Copy Markdown
Contributor

@indutny I like this approach. Can you propose this upstream?

@indutny

indutny commented Apr 29, 2016

Copy link
Copy Markdown
Member Author

Comment thread deps/v8/src/log.cc
msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR,
library_path.c_str(), start, end);
msg.Append("shared-library,\"%s\",0x%08" V8PRIxPTR ",0x%08" V8PRIxPTR
",0x%08" V8PRIxPTR,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably print the slide as a signed base 10 number because it can be < 0. For that matter, the code should really be updated to use intptr_t because that's what _dyld_get_image_vmaddr_slide() returns.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any pros of using unsigned int and base 10 here? I like how things may work both ways here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, may I ask you to raise this concern on CL page?

@bnoordhuis

Copy link
Copy Markdown
Member

Left a comment. The approach in general looks fine to me.

@indutny

indutny commented May 2, 2016

Copy link
Copy Markdown
Member Author

CL has just landed. Guess we should revisit this when it will gets to us with a v8 upgrade.

@indutny indutny mentioned this pull request May 4, 2016
2 tasks done
@indutny

indutny commented May 4, 2016

Copy link
Copy Markdown
Member Author

Superseded by #6558

@indutny indutny closed this May 4, 2016
@indutny
indutny deleted the feature/alt-gh-6466 branch May 4, 2016 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macos Issues and PRs related to the macOS platform. security Issues and PRs related to security. v8 engine Issues and PRs related to the V8 dependency. wip Issues and PRs that are still a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os x: re-enable PIE (ASLR)

6 participants