analyzer: play better with -fsanitize=bounds
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 28 Jul 2021 18:47:54 +0000 (14:47 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 28 Jul 2021 18:47:54 +0000 (14:47 -0400)
commit37eb3ef48c9840475646528751b5f8ffb7eb34ce
tree214065a8dd069d3f24e7ed4d1a2e183c07f52d9a
parentb5081130166a4f2e363f116e0e6b43d83422c947
analyzer: play better with -fsanitize=bounds

gcc/analyzer/ChangeLog:
* region-model.cc (region_model::on_call_pre): Treat
IFN_UBSAN_BOUNDS, BUILT_IN_STACK_SAVE, and BUILT_IN_STACK_RESTORE
as no-ops, rather than handling them as unknown functions.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/torture/ubsan-1.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/region-model.cc
gcc/testsuite/gcc.dg/analyzer/torture/ubsan-1.c [new file with mode: 0644]