Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

EH: Expand implicit null checks in reader #63

Closed
JosephTremoulet opened this issue Feb 19, 2015 · 3 comments · Fixed by #252
Closed

EH: Expand implicit null checks in reader #63

JosephTremoulet opened this issue Feb 19, 2015 · 3 comments · Fixed by #252
Assignees

Comments

@JosephTremoulet
Copy link
Contributor

Add null checks against the object pointer for ldfld, stfld, ldloca, ldelema, ldflda, ldelema.
Checks should use an explicit compare+branch+throw sequence.
Throw will use call rather than invoke for now (stub EH support).
Use separate throw block for each test, at least for now (it facilitates debugging, vs. shared throw block for all tests in the same EH context).
Tricky bit will be making sure the reader's flow graph bookkeeping doesn't get messed up as blocks are split. May need separate notions of MSIL block and LLVM block.

Part of #13.

@AndyAyersMS
Copy link
Member

@JosephTremoulet Are you handling callvirt here too, or doing that as a separate item? It's one of our bigger blockers right now.

@JosephTremoulet
Copy link
Contributor Author

@AndyAyersMS: Yes, this should include adding an explicit check guarding the dereference in callvirt as well.

@JosephTremoulet
Copy link
Contributor Author

#183 added the mechanics for inserting a null check sequence
#202 builds on that to add the mechanics for inserting null checks on instance arguments at calls

Still need to update the decision criteria to insert all the required checks (#203 and #204).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants