[PATCH] Code refactoring related to -fsanitize=use-after-scope

From: Martin Liška <mliska(at)suse(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] Code refactoring related to -fsanitize=use-after-scope
Date: 2016-02-15 13:37:28
Message-ID: 56C1D498.4020202@suse.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

I've been currently working on support of -sanitize=use-after-scope in the GCC compiler and
I decided to use postgresql as my test-case. The sanitation poisons every stack variable at the
very beginning of a function, unpoisons a variable at the beginning of scope definition and finally
poisons the variable again at the end of scope.

Following patch fixes issues seen by the sanitizer. Hope it's acceptable?
With the patch applied, ASAN (with the new sanitization) works fine.

Thanks,
Martin

Attachment Content-Type Size
postgresql-variable-scope.patch text/x-patch 856 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Verite 2016-02-15 13:43:44 Re: [patch] Proposal for \crosstabview in psql
Previous Message Peter Eisentraut 2016-02-15 13:34:11 Re: Small PATCH: check of 2 Perl modules