Skip to content

Commit 5411ed9

Browse files
committed
Bug 1578876 - add exception for Decimal code to check_vanilla_allocations.py; r=njn
Calls to these allocation functions from mozglue can generally be ignored. Differential Revision: https://phabricator.services.mozilla.com/D45207 --HG-- extra : moz-landing-system : lando
1 parent 18f6607 commit 5411ed9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

config/check_vanilla_allocations.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
# go through that custom allocator.
1111
#
1212
# Therefore, the presence of any calls to "vanilla" allocation/free functions
13-
# (e.g. malloc(), free()) is a bug.
13+
# from within SpiderMonkey itself (e.g. malloc(), free()) is a bug. Calls from
14+
# within mozglue and non-SpiderMonkey locations are fine; there is a list of
15+
# exceptions that can be added to as the need arises.
1416
#
1517
# This script checks for the presence of such disallowed vanilla
1618
# allocation/free function in SpiderMonkey when it's built as a library. It
@@ -159,6 +161,10 @@ def main():
159161
if filename == 'umutex.o':
160162
continue
161163

164+
# Ignore allocations from decimal conversion functions inside mozglue.
165+
if filename == 'Decimal.o':
166+
continue
167+
162168
fn = m.group(2)
163169
if filename == 'jsutil.o':
164170
jsutil_cpp.add(fn)

0 commit comments

Comments
 (0)