-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-139269: Fix unaligned memory access in JIT code patching functions #139271
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: main
Are you sure you want to change the base?
Changes from all commits
2f49286
f6765ba
b036772
c45d0cc
cf3c01b
827aa7e
684ff40
2c1339b
b5a8686
d266ac0
f075c91
d19cf62
c2cf365
c36c2b7
1e35b61
3f327a5
39bcc4c
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix undefined behavior when using unaligned store in JIT's ``patch_*`` functions. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -737,6 +737,11 @@ translate_bytecode_to_trace( | |
ADD_TO_TRACE(_TIER2_RESUME_CHECK, 0, 0, target); | ||
break; | ||
|
||
case LOAD_GLOBAL: | ||
_Py_BloomFilter_Add(dependencies, frame->f_globals); | ||
_Py_BloomFilter_Add(dependencies, frame->f_builtins); | ||
_Py_FALLTHROUGH; | ||
Comment on lines
+740
to
+743
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'm not well-versed enough here to be sure at first glance that this is correct. So I'd wait for Mark's input, or anyone else that can confirm this is correct. 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. This looks wrong to me. @ashm-dev why did you make this change? 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. The release build was crashing with a segfault without this change. There’s a related issue linked in the PR, although it’s currently closed. 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. That doesn't explain why you made this change. It seems unrelated to the issue. |
||
|
||
default: | ||
{ | ||
const struct opcode_macro_expansion *expansion = &_PyOpcode_macro_expansion[opcode]; | ||
|
Uh oh!
There was an error while loading. Please reload this page.