Closed Bug 1445595 Opened 6 years ago Closed 6 years ago

js/src/vm/JSAtom.cpp - fail undeclared on sparc

Categories

(Firefox :: Untriaged, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: petr.sumbera, Assigned: petr.sumbera)

References

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180206200532

Steps to reproduce:

On Solaris sparc I get:

gmake[1]: Entering directory '/scratch/firefox/obj-sparc64-sun-solaris2.11/js/src'
/usr/bin/g++ -std=gnu++14 -o JSAtom.o -c -I/scratch/firefox/obj-sparc64-sun-solaris2.11/dist/system_wrappers -include /scratch/firefox/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DENABLE_BINARYDATA -DENABLE_SIMD -DENABLE_WASM_SATURATING_TRUNC_OPS -DENABLE_WASM_SIGNEXTEND_OPS -DENABLE_WASM_THREAD_OPS -DENABLE_WASM_GLOBAL -DJS_CACHEIR_SPEW -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DJS_HAS_CTYPES '-DDLL_PREFIX="lib"' '-DDLL_SUFFIX=".so"' -DMOZ_HAS_MOZGLUE -I/scratch/firefox/js/src -I/scratch/firefox/obj-sparc64-sun-solaris2.11/js/src -I/scratch/firefox/obj-sparc64-sun-solaris2.11/dist/include -I/scratch/firefox/obj-sparc64-sun-solaris2.11/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /scratch/firefox/obj-sparc64-sun-solaris2.11/js/src/js-confdefs.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -O -fno-omit-frame-pointer -DFFI_NO_RAW_API -I/usr/lib/sparcv9/libffi-3.2.1/include -Wno-shadow -Werror=format -fno-strict-aliasing  -MD -MP -MF .deps/JSAtom.o.pp   /scratch/firefox/js/src/vm/JSAtom.cpp
/scratch/firefox/js/src/vm/JSAtom.cpp: In function ‘js::XDRResult js::XDRAtom(js::XDRState<mode>*, js::MutableHandleAtom)’:
/scratch/firefox/js/src/vm/JSAtom.cpp:787:54: error: there are no arguments to ‘fail’ that depend on a template parameter, so a declaration of ‘fail’ must be available [-fpermissive]
                 return fail(JS::TranscodeResult_Throw);
                                                      ^
/scratch/firefox/js/src/vm/JSAtom.cpp:787:54: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/scratch/firefox/js/src/vm/JSAtom.cpp: In instantiation of ‘js::XDRResult js::XDRAtom(js::XDRState<mode>*, js::MutableHandleAtom) [with js::XDRMode mode = (js::XDRMode)0u; js::XDRResult = mozilla::Result<mozilla::Ok, JS::TranscodeResult>; js::MutableHandleAtom = JS::MutableHandle<JSAtom*>]’:
/scratch/firefox/js/src/vm/JSAtom.cpp:804:63:   required from here
/scratch/firefox/js/src/vm/JSAtom.cpp:787:28: error: ‘fail’ was not declared in this scope
                 return fail(JS::TranscodeResult_Throw);
                            ^
In file included from /scratch/firefox/obj-sparc64-sun-solaris2.11/dist/include/mozilla/Maybe.h:13:0,
                 from /scratch/firefox/js/src/vm/JSAtom.h:10,
                 from /scratch/firefox/js/src/vm/JSAtom-inl.h:10,
                 from /scratch/firefox/js/src/vm/JSAtom.cpp:11:
/scratch/firefox/obj-sparc64-sun-solaris2.11/dist/include/mozilla/Assertions.h:632:8: error: could not convert ‘xdr->js::XDRState<mode>::codeChars<(js::XDRMode)0u>(chars, ((std::size_t)length))’ from ‘js::XDRResult {aka mozilla::Result<mozilla::Ok, JS::TranscodeResult>}’ to ‘bool’
        if ((expr)) { \
        ^
/scratch/firefox/js/src/jsutil.h:27:35: note: in expansion of macro ‘MOZ_ALWAYS_TRUE’
 #define JS_ALWAYS_TRUE(expr)      MOZ_ALWAYS_TRUE(expr)
                                   ^
/scratch/firefox/js/src/vm/JSAtom.cpp:790:9: note: in expansion of macro ‘JS_ALWAYS_TRUE’
         JS_ALWAYS_TRUE(xdr->codeChars(chars, length));
         ^
/scratch/firefox/js/src/vm/JSAtom.cpp: In instantiation of ‘js::XDRResult js::XDRAtom(js::XDRState<mode>*, js::MutableHandleAtom) [with js::XDRMode mode = (js::XDRMode)1u; js::XDRResult = mozilla::Result<mozilla::Ok, JS::TranscodeResult>; js::MutableHandleAtom = JS::MutableHandle<JSAtom*>]’:
/scratch/firefox/js/src/vm/JSAtom.cpp:807:63:   required from here
/scratch/firefox/js/src/vm/JSAtom.cpp:787:28: error: ‘fail’ was not declared in this scope
                 return fail(JS::TranscodeResult_Throw);
                            ^
Attached patch Bug1445595.patch (obsolete) — Splinter Review
Attachment #8959521 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8959521 [details] [diff] [review]
Bug1445595.patch

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

Thanks for the patch.

If you do not have commit access, upload a new patch with the following comment fixed, and set the checkin-needed keyword on the bug.

::: js/src/vm/JSAtom.cpp
@@ +750,3 @@
>          }
>  
> +        xdr->codeChars(chars, length);

Use MOZ_TRY, to forward decoding failures to the callers.
Attachment #8959521 - Flags: review?(nicolas.b.pierron) → review+
Attached patch Bug1445595.patchSplinter Review
Attachment #8959521 - Attachment is obsolete: true
Attachment #8959564 - Flags: review?(nicolas.b.pierron)
Attachment #8959564 - Flags: review?(nicolas.b.pierron) → review+
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ecc6886f6f9a
fixes JSAtom.cpp build on big endian platforms r=nbp
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ecc6886f6f9a
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Assignee: nobody → petr.sumbera
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: