Re: [PATCH] c-family: avoid compile-time-hog in c_genericize [PR108880]

2023-02-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 22, 2023 at 05:37:45PM -0500, Marek Polacek wrote: > This fixes a compile-time hog with UBSan. This only happened in cc1 but > not cc1plus. The problem is ultimately that c_genericize_control_stmt/ > STATEMENT_LIST -> walk_tree_1 doesn't use a hash_set to remember visited > nodes, so

[PATCH] c-family: avoid compile-time-hog in c_genericize [PR108880]

2023-02-22 Thread Marek Polacek via Gcc-patches
This fixes a compile-time hog with UBSan. This only happened in cc1 but not cc1plus. The problem is ultimately that c_genericize_control_stmt/ STATEMENT_LIST -> walk_tree_1 doesn't use a hash_set to remember visited nodes, so it kept on recursing for a long time. We should be able to use the pse