Last Comment Bug 307041 - nsGREGlue.cpp change breaks Solaris Studio 10 build
: nsGREGlue.cpp change breaks Solaris Studio 10 build
Status: RESOLVED FIXED
: fixed1.8
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: Sun Solaris
: -- normal (vote)
: ---
Assigned To: Doug Turner (:dougt)
:
Mentors:
: 307140 308107 308713 311924 312996 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-04 09:26 PDT by km
Modified: 2005-10-19 05:52 PDT (History)
9 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v.1 (2.75 KB, patch)
2005-09-26 11:24 PDT, Doug Turner (:dougt)
dougt: review-
Details | Diff | Review
patch v.2 (1.15 KB, patch)
2005-09-26 13:14 PDT, Doug Turner (:dougt)
dbaron: review+
Details | Diff | Review
Patch v3 (2.20 KB, patch)
2005-10-09 23:04 PDT, Leon Sha
dbaron: review+
asa: approval1.8rc1+
Details | Diff | Review

Description km 2005-09-04 09:26:01 PDT
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9a1) Gecko/20050831 Firefox/1.6a1
Build Identifier: 

The changes in 1.12 broke the Solaris Studio 10 build over the definition of
INIClosure. The errors are:

"mozilla/xpcom/glue/nsGREGlue.cpp", line 448: Error: A class with a reference
member must have a user-defined constructor.
"mozilla/xpcom/glue/nsGREGlue.cpp", line 495: Error: Expected an expression.
"mozilla/xpcom/glue/nsGREGlue.cpp", line 501: Error: Use ";" to terminate
statements.
3 Error(s) detected.


Any suggestions? 

Reproducible: Always
Comment 1 Frank Wein [:mcsmurf] 2005-09-05 14:10:13 PDT
*** Bug 307140 has been marked as a duplicate of this bug. ***
Comment 2 Mitch 2005-09-11 23:54:15 PDT
*** Bug 308107 has been marked as a duplicate of this bug. ***
Comment 3 Stephen Donner [:stephend] 2005-09-15 23:45:43 PDT
*** Bug 308713 has been marked as a duplicate of this bug. ***
Comment 4 Doug Turner (:dougt) 2005-09-26 11:24:10 PDT
Created attachment 197445 [details] [diff] [review]
patch v.1
Comment 5 Darin Fisher 2005-09-26 11:44:12 PDT
Comment on attachment 197445 [details] [diff] [review]
patch v.1

> GRE_GetPathFromConfigFile(const char* filename,
...
> {
>   nsINIParser parser;
>+  nsresult rv = parser->Init(filename);

Oops.  Wrong patch?
Comment 6 Doug Turner (:dougt) 2005-09-26 13:13:41 PDT
Comment on attachment 197445 [details] [diff] [review]
patch v.1

wow.
Comment 7 Doug Turner (:dougt) 2005-09-26 13:14:52 PDT
Created attachment 197458 [details] [diff] [review]
patch v.2
Comment 8 Darin Fisher 2005-09-26 13:48:23 PDT
Shouldn't there be some code to actually initialize INIClosure::parser?  It
looks like you're missing changes to GRE_GetPathFromConfigFile.
Comment 9 Peter Müller 2005-09-27 04:26:01 PDT
(In reply to comment #7)
> Created an attachment (id=197458) [edit]
> patch v.2 

after appliing patch v.2:
...
"nsGREGlue.cpp", line 524: Error: Cannot use nsINIParser to initialize nsINIParser*.
...
Comment 10 Peter Müller 2005-09-30 03:30:05 PDT
(In reply to comment #9)

> after applying patch v.2:

and

% diff p2/nsGREGlue.cpp  p3/nsGREGlue.cpp
518,519c518,519
<   nsINIParser parser;
<   nsresult rv = parser.Init(filename);
---
>   nsINIParser *parser;
>   nsresult rv = parser->Init(filename);
531c531
<   parser.GetSections(CheckINIHeader, &c);
---
>   parser->GetSections(CheckINIHeader, &c);

the compiler (CC: Sun C++ 5.7 Patch 117830-03 2005/07/21) 
seems to be satisfied 8-)
Comment 11 Wyllys Ingersoll 2005-09-30 10:20:42 PDT
(In reply to comment #10)
> (In reply to comment #9)
> 
> > after applying patch v.2:
> 
> and
> 
> % diff p2/nsGREGlue.cpp  p3/nsGREGlue.cpp
> 518,519c518,519
> <   nsINIParser parser;
> <   nsresult rv = parser.Init(filename);
> ---
> >   nsINIParser *parser;
> >   nsresult rv = parser->Init(filename);
> 531c531
> <   parser.GetSections(CheckINIHeader, &c);
> ---
> >   parser->GetSections(CheckINIHeader, &c);
> 
> the compiler (CC: Sun C++ 5.7 Patch 117830-03 2005/07/21) 
> seems to be satisfied 8-)


I ran into this same problem today and the above fixes seem to work
for both Studio 8 and Studio 10 compilers.


Comment 12 Leon Sha 2005-10-09 22:49:10 PDT
(In reply to comment #10)
> >   nsINIParser *parser;
> >   nsresult rv = parser->Init(filename);
It is not correct.
"parser" here is just a pointer without initialise.

Comment 13 Leon Sha 2005-10-09 23:04:37 PDT
Created attachment 199044 [details] [diff] [review]
Patch v3
Comment 14 Peter Müller 2005-10-10 05:03:56 PDT
(In reply to comment #13)
> Created an attachment (id=199044) [edit]
> Patch v3

Patch v3 is OK for the compiler mentioned above :-)
Comment 15 Benjamin Smedberg [:bsmedberg] 2005-10-10 14:17:27 PDT
*** Bug 311924 has been marked as a duplicate of this bug. ***
Comment 16 Iain MacDonnell 2005-10-10 15:47:05 PDT
(In reply to comment #15)
> *** Bug 311924 has been marked as a duplicate of this bug. ***

Argh! One of these days I'll learn how to query :/

Anyway, patch v3 works fine for me. Thanks!
Comment 17 Mats Larsson 2005-10-11 01:53:51 PDT
(In reply to comment #16)

> Argh! One of these days I'll learn how to query :/

But that's hard work to learn ;).

> Anyway, patch v3 works fine for me. Thanks!

Works fine for me too.
Comment 18 Doug Turner (:dougt) 2005-10-11 08:08:53 PDT
Checking in nsGREGlue.cpp;
/cvsroot/mozilla/xpcom/glue/nsGREGlue.cpp,v  <--  nsGREGlue.cpp
new revision: 1.15; previous revision: 1.14
done
Comment 19 Benjamin Smedberg [:bsmedberg] 2005-10-11 08:11:15 PDT
Should get this on 1.8branch as well.
Comment 20 Darin Fisher 2005-10-11 18:03:47 PDT
fixed1.8
Comment 21 Scott MacGregor 2005-10-12 09:06:48 PDT
belated flag cleanup
Comment 22 Benjamin Smedberg [:bsmedberg] 2005-10-19 05:52:49 PDT
*** Bug 312996 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.