--disable-ion --disable-unified-compilation build fails: js/src/jsscript.cpp:2057:29: error: 'ASSERT' was not declared in this scope

RESOLVED FIXED in Firefox 32

Status

()

Core
JavaScript Engine
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Jan Beich, Assigned: Jan Beich)

Tracking

Trunk
mozilla33
Points:
---

Firefox Tracking Flags

(firefox30 unaffected, firefox31 unaffected, firefox32 fixed, firefox33 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
+++ This bug was initially created as a clone of Bug #1025674 +++

There's a namespace pollution that accidentally broke --disable-ion on mozilla-aurora. ASSERT() is reserved for libraries but seems to creep in JS code.

js/src/jsscript.cpp:2057:5: error: use of undeclared identifier
      'ASSERT'
    ASSERT(script != nullptr);
    ^
js/src/jsscript.cpp:2058:5: error: use of undeclared identifier
      'ASSERT'
    ASSERT(ssd != nullptr);
    ^
2 errors generated.

mozilla-central unified build of --disable-ion picks up ASSERT macro from double-conversion library

In file included from objdir/js/src/Unified_cpp_js_src3.cpp:41:
In file included from js/src/jsnum.cpp:23:
In file included from js/src/../../mfbt/double-conversion/double-conversion.h:32:
js/src/../../mfbt/double-conversion/utils.h:31:2: error: test
#error test
 ^
1 error generated.

while --enable-ion and mozilla-beta - from WTF library

In file included from js/src/jsscript.cpp:11:
In file included from js/src/jsscriptinlines.h:13:
In file included from js/src/jit/BaselineJIT.h:14:
In file included from js/src/jscntxt.h:15:
In file included from js/src/vm/Runtime.h:41:
In file included from js/src/vm/Stack.h:16:
In file included from js/src/jit/JitFrameIterator.h:17:
In file included from js/src/jit/Snapshots.h:17:
In file included from js/src/jit/Registers.h:16:
In file included from js/src/jit/x64/Architecture-x64.h:10:
In file included from js/src/assembler/assembler/MacroAssembler.h:54:
In file included from js/src/assembler/assembler/MacroAssemblerX86_64.h:39:
In file included from js/src/assembler/assembler/MacroAssemblerX86Common.h:37:
In file included from js/src/assembler/assembler/X86Assembler.h:39:
In file included from js/src/assembler/assembler/AssemblerBuffer.h:40:
js/src/assembler/wtf/Assertions.h:29:2: error: test
#error test
 ^
1 error generated.

In file included from js/src/jsscript.cpp:11:
In file included from js/src/jsscriptinlines.h:15:
In file included from js/src/vm/ScopeObject.h:12:
In file included from js/src/jsweakmap.h:10:
In file included from js/src/jscompartment.h:14:
In file included from js/src/vm/GlobalObject.h:16:
In file included from js/src/builtin/RegExp.h:10:
In file included from js/src/vm/RegExpObject.h:22:
In file included from js/src/yarr/YarrInterpreter.h:31:
In file included from js/src/yarr/YarrPattern.h:32:
In file included from js/src/yarr/wtfbridge.h:22:
In file included from js/src/yarr/CheckedArithmetic.h:31:
js/src/assembler/wtf/Assertions.h:29:2: error: test
#error test
 ^
1 error generated.

Found out after injecting a dup into working build e.g.,

js/src/jsscript.cpp:56:9: warning: 'ASSERT' macro redefined
#define ASSERT(x)
        ^
js/src/assembler/wtf/Assertions.h:41:9: note: previous definition is
      here
#define ASSERT(assertion) MOZ_ASSERT(assertion)
        ^
1 warning generated.
(Assignee)

Updated

3 years ago
Blocks: 976446
(Assignee)

Comment 1

3 years ago
Created attachment 8444172 [details] [diff] [review]
rename to JS_ASSERT

After bisecting the first bad is bug 976446, not sure why.
Attachment #8444172 - Flags: review?(bhackett1024)
Attachment #8444172 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c41b190cb70a
(Assignee)

Comment 3

3 years ago
Comment on attachment 8444172 [details] [diff] [review]
rename to JS_ASSERT

Probably NPOTB like bug 1025674 and bug 1028775.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): none, bug 976446 only exposed it
User impact if declined: --disable-ion broken on release branches since 32.0
Testing completed (on m-c, etc.): m-i now
Risk to taking this patch (and alternatives if risky): Low, broken build at most.
String or IDL/UUID changes made by this patch: None
Attachment #8444172 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/c41b190cb70a
Assignee: nobody → jbeich
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment on attachment 8444172 [details] [diff] [review]
rename to JS_ASSERT

Aurora approval granted.
Attachment #8444172 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
status-firefox30: --- → unaffected
status-firefox31: --- → unaffected
status-firefox32: --- → affected
status-firefox33: --- → fixed
https://hg.mozilla.org/releases/mozilla-aurora/rev/2a694bbcc263
status-firefox32: affected → fixed
You need to log in before you can comment on or make changes to this bug.