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

Conversation

shinh
Copy link
Collaborator

@shinh shinh commented Feb 1, 2019

An attempt to fix #421. I don't know if this work.

@shinh
Copy link
Collaborator Author

shinh commented Feb 1, 2019

It worked. I'm not 100% sure, but I think the compiler returns the address of PLT-like thing for non-static function on Windows.

@shinh shinh requested a review from ukai February 1, 2019 01:59
@shinh
Copy link
Collaborator Author

shinh commented Feb 1, 2019

Pinging @andschwa . I guess you may know a better solution :)

@shinh shinh changed the title [WIP] Use static to define CheckStackTrace on non-GNU Use static to define CheckStackTrace on non-GNU Feb 1, 2019
@ukai ukai merged commit 6404139 into google:master Feb 2, 2019
@andyleejordan
Copy link
Contributor

@shinh This looks good to me 🎉 (I'm no Windows expert, I just got an impl working based on docs 😆)

durswd pushed a commit to durswd/glog that referenced this pull request Sep 2, 2019
for `&CheckStackAddress`, VisualStudio emits address of a trampoline like PLT, 
not the actual address of `CheckStackTrace`.

We need address of `CheckStackTrace` to guess the address range of the function.
`static` function seems to return the actual address of the function.

Fixes google#421
@sergiud sergiud added this to the 0.5 milestone Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

windows: test failed - stacktrace
5 participants