[haiku-commits] haiku: hrev45091 - src/apps/debugger/debug_info

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 25 Dec 2012 22:57:27 +0100 (CET)

hrev45091 adds 1 changeset to branch 'master'
old head: a74c82b9773ea7ac069a3515adca66b22872f468
new head: 50bd564d06af3f4a787129884ea8561e4160af46
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=50bd564+%5Ea74c82b

----------------------------------------------------------------------------

50bd564: 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.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45091
Commit:      50bd564d06af3f4a787129884ea8561e4160af46
URL:         http://cgit.haiku-os.org/haiku/commit/?id=50bd564
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Tue Dec 25 21:54:56 2012 UTC

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 2 deletions(-)
src/apps/debugger/debug_info/DwarfTypeFactory.cpp | 5 +++--

----------------------------------------------------------------------------

diff --git a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp 
b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp
index 527e500..ed28f88 100644
--- a/src/apps/debugger/debug_info/DwarfTypeFactory.cpp
+++ b/src/apps/debugger/debug_info/DwarfTypeFactory.cpp
@@ -576,8 +576,9 @@ printf("  -> failed to add type to cache\n");
                                        = 
dynamic_cast<DIETemplateTypeParameter*>(_typeEntry);
                                DwarfType* templateType;
                                if (templateTypeEntry != NULL) {
-                                       if 
(CreateType(templateTypeEntry->GetType(), templateType)
-                                               != B_OK) {
+                                       if (templateTypeEntry->GetType() == NULL
+                                               || 
CreateType(templateTypeEntry->GetType(),
+                                                       templateType) != B_OK) {
                                                continue;
                                        }
                                } else {


Other related posts:

  • » [haiku-commits] haiku: hrev45091 - src/apps/debugger/debug_info - anevilyak