-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
py/objtype: Validate super() arguments. #12918
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
Conversation
Code size report:
|
Does this still work when If I'm remembering correctly, there are some complications with this, like those discussed in #9997. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12918 +/- ##
=======================================
Coverage 98.43% 98.43%
=======================================
Files 161 161
Lines 21277 21279 +2
=======================================
+ Hits 20944 20946 +2
Misses 333 333 ☔ View full report in Codecov by Sentry. |
Should be the case yes, because for
the new code (i.e. |
Ah, this is what I was wondering about. So, yeah, not a problem.
Not related to my previous comments, but it looks like we don't have any tests that call |
This is an automated heads-up that we've just merged a Pull Request See #13763 A search suggests this PR might apply the STATIC macro to some C code. If it Although this is an automated message, feel free to @-reply to me directly if |
This fixes various null dereferencing and out-of-bounds access because super_attr assumes the held obj is effectively an object of the held type, which is now verified. Fixes issue micropython#12830. Signed-off-by: stijn <stijn@ignitron.net>
Rebased on master and tweaked the implementation to reduce code size (calling |
Fixes issue #12830 i.e. various null dereferencing and out of bounds access because super_attr assumes the held obj is effectively an object of the held type, which is now verified. Modest code size increase, but could always wrap it in MICROPY_CPYTHON_COMPAT or so?
Also happens to fix the first poc in #12605 but see comments there: not really sufficient.