On Thu, 19 Aug 2021, Philippe Mathieu-Daudé wrote: > On 8/12/21 9:14 AM, Ani Sinha wrote: > > + return; > > I suppose if you replace all 'return' by 'g_assert_not_reached()' > both issues reproducers crash? > > Your patch is not incorrect, and indeed fixes the issues, but > I feel we are going backward now allowing call which should > never be there in the first place. > Linux kernel does something like this all over the place. They simply replace functions with NOOPS when they are not allowed for a configuration. They do this relying on preprocessor macros ofcourse! It will be hard to do anythiung better without rearchitecting the modules. That would have significant impact particularly on x86.