Closed Bug 941110 Opened 6 years ago Closed 6 years ago

Make the Windows sandbox code compiles without the Win8 SDK

Categories

(Core :: Security, defect)

x86_64
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: bbondy, Assigned: bbondy)

References

Details

Attachments

(1 file, 1 obsolete file)

[13:29:39] <keeler> bbondy: ping - does the sandbox for windows compile on windows 7? I'm getting lots of undefined structures that appear to only be defined on windows 8...
[13:30:14] <bbondy> keeler: I haven't tried, and my machine does have the win8 sdk, so possibly not.
[13:30:28] <bbondy> I'll file a bug to fix
[13:30:37] <keeler> bbondy: great - thanks!
[13:30:39] <bbondy> you can install the win8 sdk to fix locally though
[13:30:44] <keeler> I see
Attached patch bug941110.diff (obsolete) — Splinter Review
Attached patch rev2Splinter Review
Attachment #8385542 - Attachment is obsolete: true
Comment on attachment 8385667 [details] [diff] [review]
rev2

Note: Checking _WIN32_WINNT < 0x0602 isn't enough here because it doesn't tell us which SDK was included, just what we were targeting.

Also checking _MSC_VER isn't correct here since this is independent of VS 2010 vs 2012.  

I think the correct thing to do is just to see if NTDDI_WIN8 is defined. I tested this on a machine with VS2012 and 2010 and win8 SDK, as well as a machine with just 2010 without win8 sdk.
Attachment #8385667 - Flags: review?(jmathies)
(In reply to Brian R. Bondy [:bbondy] from comment #3)
> Comment on attachment 8385667 [details] [diff] [review]
> rev2
> 
> Note: Checking _WIN32_WINNT < 0x0602 isn't enough here because it doesn't
> tell us which SDK was included, just what we were targeting.
> 
> Also checking _MSC_VER isn't correct here since this is independent of VS
> 2010 vs 2012.  
> 
> I think the correct thing to do is just to see if NTDDI_WIN8 is defined. I
> tested this on a machine with VS2012 and 2010 and win8 SDK, as well as a
> machine with just 2010 without win8 sdk.

Are we using these structs and enums? I'm guessing yes since they aren't defined and that causes an error. Normally what we would do is ifndef out the code that leverages the stuff the sdk doesn't provide, vs. inject the sdk gunk into our code base. Can we do that instead?
We use them in dynamically loaded functions if they are avsilable.
Comment on attachment 8385667 [details] [diff] [review]
rev2

ah ok, guess we need this stuff then. you might want to add a comment giving some detail about the situation.
Attachment #8385667 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/b1cb8672809f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.