Re: [PATCH] RISC-V: Do not free a riscv_arch_string when handling target-arch attribute

2025-04-17 Thread Jeff Law
On 2/26/25 1:46 AM, 翁愷邑 wrote: The build_target_option_node() function may return a cached node when fndecl having the same effective global_options. Therefore, freeing memory used in target nodes can lead to a use-after-free issue, as a target node may be shared by multiple fndecl. This issue

[PATCH] RISC-V: Do not free a riscv_arch_string when handling target-arch attribute

2025-02-26 Thread 翁愷邑
The build_target_option_node() function may return a cached node when fndecl having the same effective global_options. Therefore, freeing memory used in target nodes can lead to a use-after-free issue, as a target node may be shared by multiple fndecl. This issue occurs in gcc.target/riscv/target-a