Skip to content

Conversation

smanna12
Copy link
Contributor

@smanna12 smanna12 commented Nov 26, 2020

Found via a static-analysis tool:

Inside VisitTemplateTemplateArgument() function:

TemplateDecl *TD = TA.getAsTemplate.getAsTemplateDecl(); ----> Pointer 'TD' may be NULL
TemplateParameterList *TemplateParams = TD->getTemplateParameters(); ---> will be dereferenced here

This patch fixes null pointer dereference issues in SemaSYCL.cpp file by adding assert().

Signed-off-by: Soumi Manna [email protected]

Found via a static-analysis tool:

Inside VisitTemplateTemplateArgument()

    TemplateDecl *TD = TA.getAsTemplate().getAsTemplateDecl(); --->Pointer 'TD' returned from call to function 'getAsTemplateDecl' may be NULL

    TemplateParameterList *TemplateParams = TD->getTemplateParameters(); --> will be dereferenced here

This patch fixes null pointer dereference issues in SemaSYCL.cpp file by adding assert().

Signed-off-by: Soumi Manna <[email protected]>
@smanna12 smanna12 marked this pull request as ready for review November 26, 2020 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants