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

RESOLVED FIXED in mozilla1.9

Status

()

defect
--
major
RESOLVED FIXED
12 years ago
11 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
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);
OS: Other → AIX
Version: unspecified → Trunk
Posted patch Patch V1 (obsolete) — Splinter Review
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)
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 :-(
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
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.
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.
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 ?
Attachment #295201 - Flags: superreview?(mrbkap)
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.
Posted patch Patch V2Splinter Review
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)
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+
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
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.