Closed Bug 1257411 Opened 7 years ago Closed 2 years ago

security/sandbox/chromium/sandbox/win/src/ warning C4311: 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'


(Core :: Security: Process Sandboxing, defect)

Not set





(Reporter: gps, Unassigned)



(Whiteboard: sb+)

The C4311 warning is being enabled in bug 1124033. When it is enabled, 2 warnings occur in 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/ warning C4311: 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'
security/sandbox/chromium/sandbox/win/src/ warning C4311: 'reinterpret_cast': pointer truncation from 'LPOVERLAPPED' to 'DWORD'
I've just checked and it looks like these have been fixed upstream:

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)
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)
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.
Whiteboard: sb+
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/
No longer blocks: 1124033
Depends on: 1124033

Grepping the sandboxing dir in the code shows no hits for wd4311 and we use clang nowadays.

Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.