Index: Python/pythonrun.c =================================================================== --- Python/pythonrun.c (revision 67040) +++ Python/pythonrun.c (working copy) @@ -1284,7 +1284,15 @@ { PyObject *ret = NULL; mod_ty mod; - PyArena *arena = PyArena_New(); + PyArena *arena; + if (flags == NULL) { + flags = PyMem_MALLOC(sizeof(PyCompilerFlags)); + if (flags == NULL) { + PyErr_NoMemory(); + return NULL; + } + } + arena = PyArena_New(); if (arena == NULL) return NULL; Index: Lib/test/test_future.py =================================================================== --- Lib/test/test_future.py (revision 67040) +++ Lib/test/test_future.py (working copy) @@ -106,7 +106,12 @@ test_support.unload("test.test_future5") from test import test_future5 + def test_unicode_literals_exec(self): + scope = {} + exec "from __future__ import unicode_literals; x = ''" in scope + self.assertTrue(isinstance(scope["x"], unicode)) + def test_main(): test_support.run_unittest(FutureTest)