-
Notifications
You must be signed in to change notification settings - Fork 0
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
Value types field setting consistency checks #8
base: LW1
Are you sure you want to change the base?
Conversation
runtime/bcverify/rtverify.c
Outdated
/* cannot set value type to null | ||
* TODO: proper exception */ | ||
printf("BIG ERROR\n"); | ||
goto _inconsistentStack; |
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.
Other than an NLS message, how should I implement the exception throwing? I notice there are some constants defined for the verboseErrorCode
in j9consts.h
, but are these mapped to something?
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.
ya they used in errormessageframeworkrtv.c
.
I think in this case it would be better to use the _miscError
target and add your own errorcode (similar to BCV_ERR_BAD_ACCESS_PROTECTED)
Signed-off-by: Mohammad Ali Nikseresht <[email protected]>
d460b8c
to
13fc6a5
Compare
Value type fields are non-nullable - this check can be performed during bytecode verification for some cases, ie. when aconst_null appears immediately before putfield. Signed-off-by: Mohammad Ali Nikseresht <[email protected]>
a2d1634
to
05047fb
Compare
Withfield can only operate on a value type class field, and putfield and putstatic cannot operate on a value type class field. Signed-off-by: Mohammad Ali Nikseresht <[email protected]>
05047fb
to
de86920
Compare
Added wrapper for image memory allocate and image memory free
Implment monitor enter/exit for valuetypes
This change implements consistency checking for value type related field setting. A hash table of the names listed in a class's ValueTypes attribute is created, and used to perform the following checks during runtime bytecode verification:
during bytecode verification for some cases, ie. when aconst_null
appears immediately before putfield.
Also add a couple missing
#if defined
statements in field setting bytecode verification.