If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

js: hidden symbol `js::ShapeHasher::match(js::Shape*, js::Shape const*)' isn't defined

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: ojab, Assigned: brendan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100912 Firefox/4.0b6pre
Build Identifier: 

Compilation fails after -r53651:3feb012b18a3 with

c++ -o js  -fno-rtti -fno-exceptions -Wall -Wpointer-arith …
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/bin/ld: js: hidden symbol `js::ShapeHasher::match(js::Shape*, js::Shape const*)' isn't defined
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../x86_64-unknown-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[5]: *** [js] Error 1
make[5]: Leaving directory `/home/ojab/src/firefox/js/src/shell'


Reproducible: Always




GNU ld (GNU Binutils) 2.20.51.20100620
gcc version 4.5.2 20100903 (prerelease) (GCC)

Comment 1

7 years ago
This affects only DEBUG builds due to the use of inline keyword in jspropertytree.cpp on: 

inline HashNumber
ShapeHasher::hash(const Lookup l)

Bug 593256 has added a DEBUG-only reference to ShapeHasher::hash from JSObject::checkShapeConsistency(). As a workaround in the local tree I just dropped the inline keywords from ShapeHasher::hash and ShapeHasher::match. A better solution I guess would be to move the inlines into some header.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 2

7 years ago
Created attachment 474533 [details] [diff] [review]
fix
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #474533 - Flags: review?(dbaron)
Comment on attachment 474533 [details] [diff] [review]
fix

r=dbaron.

It would probably be good to declare the inline methods as inline where they're declared in addition to where they're defined, though.  I think that way you might be more likely to get errors/warnings about this.
Attachment #474533 - Flags: review?(dbaron) → review+
(Assignee)

Comment 4

7 years ago
Created attachment 474534 [details] [diff] [review]
what I'm landing

Also fix a JS_CHECK_SHAPE_THROTTLE=non-zero plus DEBUG-only failure to check consistency in edge case. This doesn't affect debug or release builds; to get the checking you have to build DEBUG and set that JS_CHECK_SHAPE_THROTTLE envar.

/be
Attachment #474533 - Attachment is obsolete: true
Attachment #474534 - Flags: review+
(Assignee)

Comment 5

7 years ago
Oops, missed David's suggestion -- I'll add inline to the static member decls before landing.

/be
(Assignee)

Comment 6

7 years ago
Created attachment 474536 [details] [diff] [review]
really gonna land this, I swear

I love how Mac GCC failed to catch the problem reported in this bug...

/be
Attachment #474534 - Attachment is obsolete: true
Attachment #474536 - Flags: review+
(Assignee)

Comment 7

7 years ago
http://hg.mozilla.org/tracemonkey/rev/60bbf40c518f
http://hg.mozilla.org/mozilla-central/rev/fc4dc7ff4e9a

/be
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-tracemonkey
You need to log in before you can comment on or make changes to this bug.