Closed Bug 1431621 Opened 2 years ago Closed 2 years ago

Sandbox MinGW Compilation error: error: stray ‘\’ in program

Categories

(Core :: Security: Process Sandboxing, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: tjr, Assigned: tjr)

References

Details

(Whiteboard: [tor][mingw-upstream-pending])

Attachments

(1 file)

> 0:01.74 /home/tom/Documents/moz/mingw-work/sandbox/security/sandbox/chromium/base/win/scoped_handle.h:21:59: error: stray ‘\’ in program
> 0:01.74  #define BASE_WIN_GET_CALLER __builtin_extract_return_addr(\\
Current mingw-w64 has _ReturnAddress() defined to __builtin_return_address(0). It does not use __builtin_extract_return_addr. I'm not sure if it's needed for platforms we care about (if it is, it should be fixed in mingw-w64).

That said, it may be a good idea to remove GCC variant in m-c and change defined(COMPILER_MSVC) to defined (WIN32) instead.
(In reply to Jacek Caban from comment #2)
> Current mingw-w64 has _ReturnAddress() defined to
> __builtin_return_address(0). It does not use __builtin_extract_return_addr.
> I'm not sure if it's needed for platforms we care about (if it is, it should
> be fixed in mingw-w64).

The gcc documentation indicates we probably don't care about that situation; I don't think you can run Windows on a sparc.

> That said, it may be a good idea to remove GCC variant in m-c and change
> defined(COMPILER_MSVC) to defined (WIN32) instead.

Yea, I think we can drop the gcc variant.
Can you add the patch file here as well, please:
security/sandbox/chromium-shim/patches/with_update/

and the name to:
security/sandbox/chromium-shim/patches/with_update/patch_order.txt
Comment on attachment 8943877 [details]
Bug 1431621 Remove the gcc variant of BASE_WIN_GET_CALLER, because MinGW defines _ReturnAddress()

https://reviewboard.mozilla.org/r/214232/#review220048

Thanks.
Attachment #8943877 - Flags: review?(bobowencode) → review+
Patch land order: 1431621 (this bug), 1431801, 1431807, 1431825
Blocks: 1431801
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6e41201152dd
Remove the gcc variant of BASE_WIN_GET_CALLER, because MinGW defines _ReturnAddress() r=bobowen
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6e41201152dd
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.