AIX linker error for trunk build xpconnect module : ERROR: Undefined symbol: .JSAutoTempValueRooter::operator delete(void*,unsigned long)

RESOLVED FIXED in mozilla1.9

Status

()

--
major
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: shailen.n.jain, Assigned: shailen.n.jain)

Tracking

Trunk
mozilla1.9
Other
AIX
Points:
---
Bug Flags:
in-testsuite -
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

781 bytes, patch
mrbkap
: review+
mrbkap
: superreview+
beltzner
: approval1.9+
Details | Diff | Splinter Review
(Assignee)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

While building the trunk on AIX, getting below linker error

ld: 0711-317 ERROR: Undefined symbol: .JSAutoTempValueRooter::operator delete(void*,unsigned long)

Reproducible: Always

Steps to Reproduce:
1.Build Mozilla Firefox Trunk build on AIX with Gnome 2.12 RPMS of 64 bit
version.
2.
3.
Actual Results:  
Build fails with the above error.

Expected Results:  
No build failure

Looks like the definition needs to be provided for the below function declarations  in jscntxt.h

    static void *operator new(size_t);
    static void operator delete(void *, size_t);
(Assignee)

Updated

11 years ago
OS: Other → AIX
Version: unspecified → Trunk
(Assignee)

Comment 1

11 years ago
Created attachment 295201 [details] [diff] [review]
Patch V1

Providing the definition for the functions 
1) static void *operator new(size_t); 
2) static void operator delete(void *, size_t);
Attachment #295201 - Flags: review?(jorendorff)
Assignee: nobody → shailen.n.jain
Component: Build Config → JavaScript Engine
Product: Firefox → Core
QA Contact: build.config → general
Comment on attachment 295201 [details] [diff] [review]
Patch V1

mrbkap added this in bug 347054. Try him as a reviewer.
Attachment #295201 - Flags: review?(jorendorff) → review?(mrbkap)

Comment 3

11 years ago
What functions are referencing these symbols? We explicitly don't add a definition because nobody is supposed to be deleting this object (it should be stack-only).

I am so tired of the broken AIX compiler :-(
(Assignee)

Comment 4

11 years ago
Looks like the symbol is being referenced in the below files.

1. XPC_XOW_Iterator function of XPCCrossOriginWrapper.cpp

2. XPC_SJOW_Iterator function of XPCSafeJSObjectWrapper.cpp

3. IteratorNext function of XPCWrapper.cpp

4. XPCWrapper::CreateIteratorObj of XPCWrapper.cpp

Comment 5

11 years ago
Shailen, you can see that XPC_XOW_Iterator should never call operator delete here: http://mxr.mozilla.org/mozilla/source/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp#1049 ... it's a stack-allocated helper object.
(Assignee)

Comment 6

11 years ago
Benjamin Smedbreg : I have opened a problem ticket to fix this issue in AIX compiler. I have been advised that the fix for the broken AIX compiler is available soon. I will keep you posted.
(Assignee)

Comment 7

11 years ago
As per IBM compilers service team, the compiler is working as designed.The reason for this error is due to the design of AIX. The workaround for this error is to add a function definition as below.

    static void *operator new(size_t) { return 0; }
    static void operator delete(void *, size_t) {}

The workaround is made available in patch V1 ( posted earlier )

Can you please review the patch V1 ?
(Assignee)

Updated

11 years ago
Attachment #295201 - Flags: superreview?(mrbkap)

Comment 8

11 years ago
There is no reason to add the inline. If we're going to take a patch at all, it should be to remove the operator new/delete declarations altogether for AIX. But I think we should WONTFIX this bug and let AIX patch the sources locally.
(Assignee)

Comment 9

11 years ago
Created attachment 319544 [details] [diff] [review]
Patch V2

Revised patch to remove the function declarations for AIX only
Attachment #295201 - Attachment is obsolete: true
Attachment #319544 - Flags: superreview?(mrbkap)
Attachment #319544 - Flags: review?(mrbkap)
Attachment #295201 - Flags: superreview?(mrbkap)
Attachment #295201 - Flags: review?(mrbkap)

Updated

11 years ago
Attachment #319544 - Flags: superreview?(mrbkap)
Attachment #319544 - Flags: superreview+
Attachment #319544 - Flags: review?(mrbkap)
Attachment #319544 - Flags: review+
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 319544 [details] [diff] [review]
Patch V2

AIX compile fix.
Attachment #319544 - Flags: approval1.9?
Comment on attachment 319544 [details] [diff] [review]
Patch V2

a1.9=beltzner
Attachment #319544 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in js/src/jscntxt.h;
/cvsroot/mozilla/js/src/jscntxt.h,v  <--  jscntxt.h
new revision: 3.204; previous revision: 3.203
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9

Updated

10 years ago
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.