[asan_symbolize] Workaround bug in old Python 2 versions.

The change landed in r358657 broke some of the buildbots because they
use an older version of Python 2 that raises this error.

```
File "/Volumes/data/dev/llvm/upstream/master/src/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py", line 509
  exec(f.read(), globals_space, None)
SyntaxError: unqualified exec is not allowed in function 'load_plugin_from_file' it contains a nested function with free variables
```

I can reproduce this problem when using Python 2.7.6.

To workaround this some indirection has been added to prevent the broken
(the line at fault would never be executed) SyntaxError error in old
Python versions from being raised.

rdar://problem/49476995

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@358682 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/scripts/asan_symbolize.py b/lib/asan/scripts/asan_symbolize.py
index d3025e3..01b816c 100755
--- a/lib/asan/scripts/asan_symbolize.py
+++ b/lib/asan/scripts/asan_symbolize.py
@@ -494,6 +494,10 @@
     self._plugins = [ ]
     self._plugin_names = set()
 
+  def _load_plugin_from_file_impl_py_gt_2(self, file_path, globals_space):
+      with open(file_path, 'r') as f:
+        exec(f.read(), globals_space, None)
+
   def load_plugin_from_file(self, file_path):
     logging.info('Loading plugins from "{}"'.format(file_path))
     globals_space = dict(globals())
@@ -505,8 +509,9 @@
     if sys.version_info.major < 3:
       execfile(file_path, globals_space, None)
     else:
-      with open(file_path, 'r') as f:
-        exec(f.read(), globals_space, None)
+      # Indirection here is to avoid a bug in older Python 2 versions:
+      # `SyntaxError: unqualified exec is not allowed in function ...`
+      self._load_plugin_from_file_impl_py_gt_2(file_path, globals_space)
 
   def add_plugin(self, plugin):
     assert isinstance(plugin, AsanSymbolizerPlugIn)