security/sandbox/chromium/sandbox/win/src/broker_services.cc(282): warning C4311: 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'

NEW
Unassigned

Status

()

3 years ago
3 years ago

People

(Reporter: gps, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: sb+)

(Reporter)

Description

3 years ago
The C4311 warning is being enabled in bug 1124033. When it is enabled, 2 warnings occur in broker_services.cc when building with VS2015u1. These warnings fail the build because of warnings as errors and therefore block the switch to Visual Studio 2015.

security/sandbox/chromium/sandbox/win/src/broker_services.cc(282): warning C4311: 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'
security/sandbox/chromium/sandbox/win/src/broker_services.cc(312): warning C4311: 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'

Comment 1

3 years ago
I've just checked and it looks like these have been fixed upstream:
https://chromium.googlesource.com/chromium/src/+/359cb535d023f8c83f7b6a796bc43a30f4594ad7

I was trying to take a new version of the upstream sandboxing code in bug 1228604, but was blocked because we don't have the latest VS2013 updates on the build servers.

I haven't had time to see if we could work around that, so was waiting for the TaskCluster switch-over, which would apparently be using the latest.

Hopefully if we move to VS2015 first, then that will solve my problems and I can update, which will mean we can get rid of these.

When this switch happens, would all builds be using VS2015?
Flags: needinfo?(gps)
(Reporter)

Comment 2

3 years ago
I'm trying to move mozilla-central to VS2015 this release cycle. All Windows builds using Visual Studio would be using VS2015u1. That will ride the trains.

As for this bug, I see 2 options:

1) cherry pick the upstream fix
2) Disable C4311 and undisable it once you import the latest upstream code [after the VS2015 transition occurs].

Also, bug 1256490, bug 1256499, bug 1256484, and bug 1257036 all hide VS2015 warnings in security/. We shouldn't lose track of undoing the workarounds related to patched upstream code.
Flags: needinfo?(gps)

Comment 3

3 years ago
OK thanks, I think we might as well wait until we take the full update.

I'll see if we can remove any of the warning suppressions when I do that, including these latest ones.

Updated

3 years ago
Whiteboard: sb+
(Reporter)

Comment 4

3 years ago
Bug 1124033 landed the -wd4311 addition that was initially in this bug. Morphing this bug to track removing that flag from CXXFLAGS in security/sandbox/staticruntime/moz.build.
No longer blocks: 1124033
Depends on: 1124033
You need to log in before you can comment on or make changes to this bug.