From 14a02ad0feb0bcd9fb23645034207a4a1b862705 Mon Sep 17 00:00:00 2001 From: Paul Leathers Date: Fri, 16 Dec 2016 11:29:38 -0800 Subject: [PATCH] Don't attempt to create a deferred stub for a non-deferred function. Works around a parser anomaly that appeared with re-deferral. I'll keep investigating the cause of the anomaly. --- lib/Parser/Parse.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Parser/Parse.cpp b/lib/Parser/Parse.cpp index cdb983a2c24..14b0dd921d3 100644 --- a/lib/Parser/Parse.cpp +++ b/lib/Parser/Parse.cpp @@ -13455,6 +13455,13 @@ DeferredFunctionStub * BuildDeferredStubTree(ParseNode *pnodeFnc, Recycler *recy } AssertOrFailFast(i < nestedCount); + if (pnodeChild->sxFnc.pnodeBody != nullptr) + { + // Anomalous case of a non-deferred function nested within a deferred one. + // Work around by discarding the stub tree. + return nullptr; + } + if (pnodeChild->sxFnc.IsGeneratedDefault()) { ++i;