Closed Bug 82523 Opened 25 years ago Closed 25 years ago

AIX Tinderbox/builds are busted

Categories

(Core :: DOM: Editor, defect)

Other
AIX
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla0.9.1

People

(Reporter: jdunn, Assigned: jdunn)

References

()

Details

The following compile causes the subsequent compiler error: xlC_r -o nsTableEditor.o -c <blah> /builds/tinderbox/SeaMonkey/AIX_4.3_Clobber/mozilla/editor/base/nsTableEditor.cp p xlC_r: 1501-230 Internal compiler error; please contact your Service Representative I have tracked it down to line 2057 of nsTableEditor.cpp nsString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); which generates the following 'code': nsSTring newCellType( (tagName == ((const nsAFlatString &)(nsDependentString((( const PRUnichar*)((void*)(L"td"))), PRUint32((sizeof(L"td")/sizeof(wchar_t))-1)) ))) ? ((const nsAFlatString&)(nsDependentString(((const PRUnichar*)((void*)(L"th "))), PRUint32((sizeof(L"th")/sizeof(wchar_t))-1)))) : ((const nsAFlatString&)(n sDependentString(((const PRUnichar*)((void*)(L"td"))), PRUint32((sizeof(L"td")/s izeof(wchar_t))-1)))) );
I have a 'hack' fix, my guess is that there is a better way to do this but am hoping that between you guys we can figure that out... Index: nsTableEditor.cpp =================================================================== RCS file: /cvsroot/mozilla/editor/base/nsTableEditor.cpp,v retrieving revision 1.47 diff -u -r1.47 nsTableEditor.cpp --- nsTableEditor.cpp 2001/05/15 21:30:24 1.47 +++ nsTableEditor.cpp 2001/05/24 12:13:53 @@ -2054,7 +2054,15 @@ // Set to the opposite of current type nsAutoString tagName; GetTagString(aSourceCell, tagName); - nsString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); + const char *tmpTableType; + + if (tagName == NS_LITERAL_STRING("td")) + tmpTableType = "th"; + else + tmpTableType = "td"; + + nsString newCellType; + newCellType.AssignWithConversion(tmpTableType); // Save current selection to restore when done // This is needed so ReplaceContainer can monitor selection
Target Milestone: --- → mozilla0.9.1
adding aki to cc list
updating qa
QA Contact: sujay → jdunn
The following would be more efficient. Would it also fix the bustage? Index: nsTableEditor.cpp =================================================================== RCS file: /cvsroot/mozilla/editor/base/nsTableEditor.cpp,v retrieving revision 1.47 diff -u -d -r1.47 nsTableEditor.cpp --- nsTableEditor.cpp 2001/05/15 21:30:24 1.47 +++ nsTableEditor.cpp 2001/05/24 13:38:36 @@ -2054,7 +2054,11 @@ // Set to the opposite of current type nsAutoString tagName; GetTagString(aSourceCell, tagName); - nsString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); + NS_NAMED_LITERAL_STRING(tdType, "td"); + NS_NAMED_LITERAL_STRING(thType, "th"); + nsAString& newCellType = tdType; + if (tagName == tdType) + newCellType = thType; // Save current selection to restore when done // This is needed so ReplaceContainer can monitor selection
yes it does, in fact using this method in the old code works too... So here is my newest diff: Index: nsTableEditor.cpp =================================================================== RCS file: /cvsroot/mozilla/editor/base/nsTableEditor.cpp,v retrieving revision 1.47 diff -u -r1.47 nsTableEditor.cpp --- nsTableEditor.cpp 2001/05/15 21:30:24 1.47 +++ nsTableEditor.cpp 2001/05/24 13:53:36 @@ -2054,7 +2054,9 @@ // Set to the opposite of current type nsAutoString tagName; GetTagString(aSourceCell, tagName); - nsString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); + NS_NAMED_LITERAL_STRING(tdType, "td"); + NS_NAMED_LITERAL_STRING(thType, "th"); + nsString newCellType( (tagName == tdType) ? thType : tdType ); // Save current selection to restore when done // This is needed so ReplaceContainer can monitor selection
Yeah, dbaron and I have used this pattern elsewhere. sr=scc.
Table code is mine. Does this work: nsAutoString newCellType( (tagName == NS_LITERAL_STRING("td")) ? NS_LITERAL_STRING("th") : NS_LITERAL_STRING("td") ); instead? Having to remember to use yet another string macro in cases where we are comparing strings is a real pain!
Nope... the nsAutoString doesn't work. My guess it is the compiler playing around with all of the NS_<BLAH>_STRINGS inside of a call to create a 'String'. We are probably blowing out the stack or something on the compiler. So unless you have an issue, I plan on checking in the previously sr=scc patch.
I understand. In that case, the last fix is just fine.
What bug has been opened with the IBM compiler folks? Or is that a waste of time?
Waste of time (IMHO). I sent an email to the toronto compiler guys and they told me to open a bug. I went to the website to open one and they started asking for customer # and junk... Since I am sure it is fixes in 5.0 and they are not supporting 3.6.4 anymore, I gave up...
Fix checked in
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.