From 7b60572a0ed6ce40610da05d0743690833257c28 Mon Sep 17 00:00:00 2001 From: "pkw%us.ibm.com" Date: Fri, 16 Jan 2004 21:04:12 +0000 Subject: [PATCH] Bug 231104 - Checkin for Bug 195350 causes AIX build to segfault on startup. r=bugmail@sicking.cc, sr=tor@acm.org --- content/base/src/nsAttrAndChildArray.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/base/src/nsAttrAndChildArray.cpp b/content/base/src/nsAttrAndChildArray.cpp index fa19def13fdc..1476c1757de8 100644 --- a/content/base/src/nsAttrAndChildArray.cpp +++ b/content/base/src/nsAttrAndChildArray.cpp @@ -42,8 +42,15 @@ #include "prbit.h" #include "nsString.h" +/** + * Due to a compiler bug in VisualAge C++ for AIX, we need to return the + * address of the first index into mBuffer here, instead of simply returning + * mBuffer itself. + * + * See Bug 231104 for more information. + */ #define ATTRS(_impl) \ - NS_REINTERPRET_CAST(InternalAttr*, (_impl)->mBuffer) + NS_REINTERPRET_CAST(InternalAttr*, &((_impl)->mBuffer[0])) #define NS_IMPL_EXTRA_SIZE \