[PATCH] analyzer: Fix regression bug after r14-1632-g9589a46ddadc8b [pr110198]

David Malcolm dmalcolm@redhat.com
Wed Jun 28 23:36:42 GMT 2023

On Thu, 2023-06-22 at 21:55 +0200, priour.be@gmail.com wrote:
> From: benjamin priour <priour.be@gmail.com>
> Resend with proper subject line ...
> Hi,

Hi Benjamin

> Below is the fix to regression bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110198
> Was bootstrapped and regtested successfully on x86_64-linux-gnu
> Considering mishap from last patch, I'd would appreciate if you could
> also regtest it, to be sure :)

I tried this, but it didn't apply cleanly to my working copy.  Which
version of master was this against / when did you last rebase this?  I
see in comment #5 of PR 110198 that the results have been changing.


> g++.dg/analyzer/pr100244.C was failing after a patch of PR109439.
> The reason was a spurious preemptive return of get_store_value upon out-of-bounds read that
> was preventing further checks. Now instead, a boolean value check_poisoned goes to false when
> a OOB is detected, and is later on given to get_or_create_initial_value.
> gcc/analyzer/ChangeLog:
>         * region-model-manager.cc (region_model_manager::get_or_create_initial_value): Take an
>                 optional boolean value to bypass poisoning checks
>         * region-model-manager.h: Update declaration of the above function.
>         * region-model.cc (region_model::get_store_value): No longer
>                 returns on OOB, but rather gives a boolean to get_or_create_initial_value.
>         (region_model::check_region_access): Update docstring.
>         (region_model::check_region_for_write): Update docstring.

Something's gone a bit wrong with the formatting of the ChangeLog
entries.  Ideally they shouldn't go wider than 74 columns, so they need
a few newlines.  Also, some of the lines have too many leading tabs.


The content of the patch itself looks reasonable.



More information about the Gcc-patches mailing list