[Sun Studio] Mangled name mismatch for LoadInlineStyle and LoadStyleLink (release build only)

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

Tracking

Trunk
x86
Solaris
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

9 years ago
ld: fatal: symbol referencing errors. No output written to nsIFileEnumerator
gmake[4]: *** [nsIFileEnumerator] Error 1
Undefined                       first referenced
 symbol                             in file
unsigned mozilla::css::Loader::LoadStyleLink(nsIContent*,nsIURI*,const nsAString_internal&,const nsAString_internal&,int,nsICSSLoaderObserver*,int*) ../../dist/lib/libxul.so
Undefined                       first referenced
 symbol                             in file
unsigned mozilla::css::Loader::LoadInlineStyle(nsIContent*,nsIUnicharInputStream*,unsigned,const nsAString_internal&,const nsAString_internal&,nsICSSLoaderObserver*,int*,int*) ../../dist/lib/libxul.so
unsigned mozilla::css::Loader::LoadStyleLink(nsIContent*,nsIURI*,const nsAString_internal&,const nsAString_internal&,int,nsICSSLoaderObserver*,int*) ../../dist/lib/libxul.so
ld: fatal: symbol referencing errors. No output written to TestRegistrationOrder
unsigned mozilla::css::Loader::LoadInlineStyle(nsIContent*,nsIUnicharInputStream*,unsigned,const nsAString_internal&,const nsAString_internal&,nsICSSLoaderObserver*,int*,int*) ../../dist/lib/libxul.so
ld: fatal: symbol referencing errors. No output written to TestCallTemplates

nm toolkit/library/libxul.so | grep LoadStyleLink
[135060]        |         0|         0|FUNC |GLOB |0    |UNDEF  |__1cHmozillaDcssGLoaderNLoadStyleLink6MpnKnsIContent_pnGnsIURI_rknSnsAString_internal_9AipnUnsICSSLoaderObserver_pi_I_
[3668]  |  13018708|      1401|FUNC |LOCL |2    |13     |__1cHmozillaDcssGLoaderNLoadStyleLink6MpnKnsIContent_pnGnsIURI_rknSnsAString_internal_rk7ipnUnsICSSLoaderObserver_pi_I_

nm toolkit/library/libxul.so | grep LoadStyleLink | c++filt 
[135060]        |         0|         0|FUNC |GLOB |0    |UNDEF  |unsigned mozilla::css::Loader::LoadStyleLink(nsIContent*,nsIURI*,const nsAString_internal&,const nsAString_internal&,int,nsICSSLoaderObserver*,int*)
[3668]  |  13018708|      1401|FUNC |LOCL |2    |13     |unsigned mozilla::css::Loader::LoadStyleLink(nsIContent*,nsIURI*,const nsAString_internal&,const nsAString_internal&,int,nsICSSLoaderObserver*,int*)

nm toolkit/library/libxul.so | grep LoadInlineStyle
[136677]        |         0|         0|FUNC |GLOB |0    |UNDEF  |__1cHmozillaDcssGLoaderPLoadInlineStyle6MpnKnsIContent_pnVnsIUnicharInputStream_IrknSnsAString_internal_9ApnUnsICSSLoaderObserver_pi9D_I_
[21555] |  13017900|       808|FUNC |LOCL |2    |13     |__1cHmozillaDcssGLoaderPLoadInlineStyle6MpnKnsIContent_pnVnsIUnicharInputStream_IrknSnsAString_internal_rk7pnUnsICSSLoaderObserver_pi9F_I_

nm toolkit/library/libxul.so | grep LoadInlineStyle | c++filt 
[136677]        |         0|         0|FUNC |GLOB |0    |UNDEF  |unsigned mozilla::css::Loader::LoadInlineStyle(nsIContent*,nsIUnicharInputStream*,unsigned,const nsAString_internal&,const nsAString_internal&,nsICSSLoaderObserver*,int*,int*)
[21555] |  13017900|       808|FUNC |LOCL |2    |13     |unsigned mozilla::css::Loader::LoadInlineStyle(nsIContent*,nsIUnicharInputStream*,unsigned,const nsAString_internal&,const nsAString_internal&,nsICSSLoaderObserver*,int*,int*)

If I add "-g" for compiling nsCSSLoader.cpp, the problem is gone.
Reproduced with both SS12 and SS12U1.

It might be a bug of compiler, I need to consult compiler team.
I assume the GLOB vs LOCL thing is likely to be relevant, right?
Assignee

Comment 2

9 years ago
Since it is UNDEF it has to be GLOB.

The issue here is documented at http://developers.sun.com/sunstudio/documentation/ss12u1/mr/READMEs/c++.html#cNameMangling

Perhaps we use actual types and equivalent typedefs inconsistently in the declaration and definition of the affected functions.
> Perhaps we use actual types and equivalent typedefs inconsistently

Yep, exactly.  nsAString vs nsSubstring.
Blocks: 544112
Assignee

Comment 4

9 years ago
Posted patch patchSplinter Review
Thanks for pointing out.
Attachment #430560 - Flags: review?(bzbarsky)
Attachment #430560 - Flags: review?(bzbarsky) → review+
FWIW, that's a subset of the patch in bug 549795 ;-)
Assignee

Comment 6

9 years ago
http://hg.mozilla.org/mozilla-central/rev/5c9e056e348a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.