"non-relocatable subtraction expression" trying to compile content/canvas/src/CanvasUtils.cpp

RESOLVED FIXED in mozilla9

Status

()

Core
Canvas: 2D
--
blocker
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Hanspeter Niederstrasser, Assigned: glandium)

Tracking

Trunk
mozilla9
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
Similar to bug 653777 and bug 624080:

10.5.8 with i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)

g++-4.2 -o CanvasUtils.o -c  -fvisibility=hidden -DUSE_ANGLE -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Darwin9.8.0\" -DOSARCH=Darwin -DEXCLUDE_SKIA_DEPENDENCIES -DCHROMIUM_MOZILLA_BUILD  -DOS_MACOSX=1 -DOS_POSIX=1  -D_IMPL_NS_LAYOUT -I/src/mozilla-central/ipc/chromium/src -I/src/mozilla-central/ipc/glue -I../../../ipc/ipdl/_ipdlheaders  -I/src/mozilla-central/content/canvas/src -I. -I../../../dist/include -I../../../dist/include/nsprpub  -I/src/mozilla-central/obj-i386-apple-darwin9.8.0-mac/dist/include/nspr -I/src/mozilla-central/obj-i386-apple-darwin9.8.0-mac/dist/include/nss      -I/src/mozilla-central/content/canvas/src/../../../layout/xul/base/src -I/src/mozilla-central/content/canvas/src/../../../layout/style -I/src/mozilla-central/content/canvas/src/../../../layout/generic -I/src/mozilla-central/content/canvas/src/../../base/src -I/src/mozilla-central/content/canvas/src/../../html/content/src   -fPIC  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -fno-strict-aliasing -fno-common -fshort-wchar -pthread -DNO_X11 -pipe  -DNDEBUG -DTRIMMED -g -O3 -fomit-frame-pointer -I/src/mozilla-central/obj-i386-apple-darwin9.8.0-mac/dist/include/cairo -DNO_X11   -DMOZILLA_CLIENT -include ../../../mozilla-config.h -MD -MF .deps/CanvasUtils.pp /src/mozilla-central/content/canvas/src/CanvasUtils.cpp
{standard input}:1318:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1318:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1301:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1301:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1284:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1284:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1267:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1267:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1250:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1250:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1232:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1232:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:521:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:521:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:504:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:504:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:487:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:487:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:470:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:470:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:453:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:453:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:435:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:435:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:unknown:Undefined local symbol L00000000001$pb
{standard input}:unknown:Undefined local symbol L00000000004$pb
make[7]: *** [CanvasUtils.o] Error 1
make[7]: Leaving directory `/src/mozilla-central/obj-i386-apple-darwin9.8.0-mac/content/canvas/src'
(Assignee)

Comment 1

6 years ago
Like in bug 653777, please generate the corresponding .s file and attach it.
(Reporter)

Comment 2

6 years ago
Created attachment 545776 [details]
CanvasUtils.s
(Assignee)

Comment 3

6 years ago
So, the responsible code is:
http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/CanvasUtils.cpp#217

which uses DOUBLE_TO_JSVAL, which looks like this:
static JS_ALWAYS_INLINE jsval
DOUBLE_TO_JSVAL(jsdouble d)
{
    d = JS_CANONICALIZE_NAN(d);
    return IMPL_TO_JSVAL(DOUBLE_TO_JSVAL_IMPL(d));
}

So all in all, this is actually another case of JS_CANONICALIZE_NAN mis-inlining. Had you tried my last patch from bug 653777, which changes JS_CANONICALIZE_NAN?
(Reporter)

Comment 4

6 years ago
Applying attachment 545185 [details] [diff] [review] from bug 653777 just changes the line numbers in the error output.

{standard input}:1424:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1424:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1407:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1407:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1390:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1390:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1373:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1373:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1356:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1356:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:1338:non-relocatable subtraction expression, "LC1" minus "L00000000004$pb"
{standard input}:1338:symbol: "L00000000004$pb" can't be undefined in a subtraction expression
{standard input}:574:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:574:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:557:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:557:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:540:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:540:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:523:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:523:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:506:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:506:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:488:non-relocatable subtraction expression, "LC1" minus "L00000000001$pb"
{standard input}:488:symbol: "L00000000001$pb" can't be undefined in a subtraction expression
{standard input}:unknown:Undefined local symbol L00000000001$pb
{standard input}:unknown:Undefined local symbol L00000000004$pb
make[7]: *** [CanvasUtils.o] Error 1
(Assignee)

Comment 5

6 years ago
Created attachment 545903 [details] [diff] [review]
Attempt

Can you try this?
(Reporter)

Comment 6

6 years ago
(In reply to comment #5)
> Created attachment 545903 [details] [diff] [review] [review]
> Attempt
> 
> Can you try this?

Success!
(Assignee)

Comment 7

6 years ago
Created attachment 546007 [details] [diff] [review]
Manually inline DOUBLE_TO_JSVAL to avoid Xcode 3.1.4 miscompilation
Attachment #546007 - Flags: review?(jimb)
(Assignee)

Updated

6 years ago
Attachment #545903 - Attachment is obsolete: true

Comment 8

6 years ago
Comment on attachment 546007 [details] [diff] [review]
Manually inline DOUBLE_TO_JSVAL to avoid Xcode 3.1.4 miscompilation

Review of attachment 546007 [details] [diff] [review]:
-----------------------------------------------------------------

So, it's okay to drop the 'JS_ASSERT(JSVAL_IS_DOUBLE_IMPL(l))' that appears in DOUBLE_TO_JSVAL_IMPL because the whole point of the function is that any incoming NaN gets turned into the NaN that isn't the representation of some other kind of JavaScript value. Right?
Attachment #546007 - Flags: review?(jimb) → review+
(Assignee)

Updated

6 years ago
Assignee: nobody → mh+mozilla
(Assignee)

Comment 9

6 years ago
right
(Assignee)

Comment 10

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ddec215cf62
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/5ddec215cf62
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.