If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Properly sandbox functions inside a template

RESOLVED FIXED in Firefox 48

Status

()

Core
Build Config
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

(Blocks: 1 bug)

unspecified
mozilla48
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

2 years ago
Created attachment 8733238 [details]
MozReview Request: Bug 1258619 - Properly sandbox functions inside a template

The way functions are being sandboxed in moz.configure land is that
their global namespace is being replaced with a limited and identifiable
dict. And we avoid re-wrapping a function that already received this
treatment.

The problem is that template functions have their global namespace
replaced, and any function that is defined within the template inherits
that global namespace. So when it comes time to wrap those functions
defined in templates with e.g. depends, we detect that they're already
wrapped although they are not, because we look if their global namespace
is of the recognizable type we use when replacing it.

So instead of looking at the global namespace type, keep track of all
functions that are wrapped.

Review commit: https://reviewboard.mozilla.org/r/41671/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/41671/
Attachment #8733238 - Flags: review?(gps)
Comment on attachment 8733238 [details]
MozReview Request: Bug 1258619 - Properly sandbox functions inside a template

https://reviewboard.mozilla.org/r/41671/#review38345

::: python/mozbuild/mozbuild/configure/__init__.py:137
(Diff revision 1)
> +        # Store all results from _prepare_function
> +        self.__prepared_functions = set()

Nit: Single leading underscore seems to be the style in this file.
Attachment #8733238 - Flags: review+

Comment 3

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbfbdaa25c6c

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/bbfbdaa25c6c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Attachment #8733238 - Flags: review?(gps)
You need to log in before you can comment on or make changes to this bug.