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

Use static to define CheckStackTrace on non-GNU #429

Merged
merged 3 commits into from
Feb 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a comment to describe the reason of the ifndef
  • Loading branch information
shinh committed Feb 1, 2019
commit 4e34bff1700972e67cf47955e0431d84ffd13a1d
5 changes: 5 additions & 0 deletions src/stacktrace_unittest.cc
Original file line number Diff line number Diff line change
@@ -181,6 +181,11 @@ static void ATTRIBUTE_NOINLINE CheckStackTrace1(int i) {
DECLARE_ADDRESS_LABEL(end);
}
#ifndef __GNUC__
// On non-GNU environment, we use the address of `CheckStackTrace` to
// guess the address range of this function. This guess is wrong for
// non-static function on Windows. This is probably because
// `&CheckStackTrace` returns the address of a trampoline like PLT,
// not the actual address of `CheckStackTrace`.
static
#endif
void ATTRIBUTE_NOINLINE CheckStackTrace(int i) {