-
Notifications
You must be signed in to change notification settings - Fork 238
8315380: AsyncGetCallTrace crash in frame::safe_for_sender #3003
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/* | ||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved. | ||
* Copyrithg (c) 2025, Datadog, Inc. All rights reserved. | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
|
@@ -84,7 +85,8 @@ bool frame::safe_for_sender(JavaThread *thread) { | |
// So unextended sp must be within the stack but we need not to check | ||
// that unextended sp >= sp | ||
|
||
bool unextended_sp_safe = (unextended_sp < thread->stack_base()); | ||
bool unextended_sp_safe = (unextended_sp < thread->stack_base() && \ | ||
unextended_sp >= thread->stack_base() - thread->stack_size()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Also, I noticed that the check for unextended_sp is not done very consistently across archs. This is also changed in 8238988 but I opted for the simplicity and added the change only for the arch for which the original issue was reported. I hope it's ok but if a more extensive change is preferred I can apply similar logic to other archs as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see this for other arches:
So I think only AArch64, PPC and S390 are affected by this bug? Checking against @TheRealMDoerr might disagree, though :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I'm not interested in asprof with jdk11. One remark: I wouldn't allow Copyright additions if I was lead maintainer. |
||
|
||
if (!unextended_sp_safe) { | ||
return false; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to agree that this doesn't really need a copyright update.