Skip to content

C++: Better fix for void type on buffer access #2900

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

Merged
merged 2 commits into from
Mar 2, 2020
Merged

C++: Better fix for void type on buffer access #2900

merged 2 commits into from
Mar 2, 2020

Conversation

dbartol
Copy link

@dbartol dbartol commented Feb 22, 2020

Fixes github/codeql-c-analysis-team#20

This change undoes the workaround in #2736, and replaces it with a fix for the underlying cause. The problem was that the IR construction code for side effects incorrectly assumed that BufferAccessOpcode included SizedBufferAccessOpcode. I think that was actually a perfectly reasonable assumption to make, so I changed the Opcode hierarchy to make it true.

Fixes issue https://github.com/github/codeql-c-analysis-team/issues/20

This change undoes the workaround in #2736, and replaces it with a fix for the underlying cause. The problem was that the IR construction code for side effects incorrectly assumed that `BufferAccessOpcode` included `SizedBufferAccessOpcode`. I think that was actually a perfectly reasonable assumption to make, so I changed the `Opcode` hierarchy to make it true.
jbj
jbj previously approved these changes Feb 24, 2020
Copy link
Contributor

@jbj jbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but qlformat isn't happy.

@jbj jbj merged commit dab6691 into github:master Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants