Fix crash issue with some cases of template types.
- If a template type parameter resolves to a void type, gcc doesn't actually generate a type attribute for the instantiation, leading to a crash in CreateType(). Was observable with MemoryDeleter and others.
This commit is contained in:
@@ -576,8 +576,9 @@ printf(" -> failed to add type to cache\n");
|
|||||||
= dynamic_cast<DIETemplateTypeParameter*>(_typeEntry);
|
= dynamic_cast<DIETemplateTypeParameter*>(_typeEntry);
|
||||||
DwarfType* templateType;
|
DwarfType* templateType;
|
||||||
if (templateTypeEntry != NULL) {
|
if (templateTypeEntry != NULL) {
|
||||||
if (CreateType(templateTypeEntry->GetType(), templateType)
|
if (templateTypeEntry->GetType() == NULL
|
||||||
!= B_OK) {
|
|| CreateType(templateTypeEntry->GetType(),
|
||||||
|
templateType) != B_OK) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user