From 2a9d603713c9bafa50ae2e2840da28feee28ff1a Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 30 Jul 2011 00:47:26 -0400 Subject: [PATCH] Fix potential infinite recursion if header file pretends to include itself. --- pyopencl/cache.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyopencl/cache.py b/pyopencl/cache.py index 59f41349..7719c3a8 100644 --- a/pyopencl/cache.py +++ b/pyopencl/cache.py @@ -150,6 +150,9 @@ def get_dependencies(src, include_path): finally: src_file.close() + # prevent infinite recursion if some header file appears to include itself + result[included_file_name] = None + checksum = new_hash() update_checksum(checksum, included_src) _inner(included_src) -- GitLab