Closed Bug 671423 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: Graphics: Canvas2D, defect)

x86
macOS
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: niederstrasser, Assigned: glandium)

Details

(Whiteboard: [inbound])

Attachments

(2 files, 1 obsolete file)

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'
Like in bug 653777, please generate the corresponding .s file and attach it.
Attached file CanvasUtils.s
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?
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
Attached patch Attempt (obsolete) — Splinter Review
Can you try this?
(In reply to comment #5)
> Created attachment 545903 [details] [diff] [review] [review]
> Attempt
> 
> Can you try this?

Success!
Attachment #545903 - Attachment is obsolete: true
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: nobody → mh+mozilla
right
https://hg.mozilla.org/mozilla-central/rev/5ddec215cf62
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: