Re: violating function pointer signature

Florian Weimer
2020-11-18T18:32:29Z

* Segher Boessenkool:

> On Wed, Nov 18, 2020 at 12:17:30PM -0500, Steven Rostedt wrote:
>> I could change the stub from (void) to () if that would be better.
>
> Don't? In a function definition they mean exactly the same thing (and
> the kernel uses (void) everywhere else, which many people find clearer).

And I think () functions expected a caller-provided parameter save
area on powerpc64le, while (void) functions do not. It does not
matter for an empty function, but GCC prefers to use the parameter
save area instead of setting up a stack frame if it is present. So
you get stack corruption if you call a () function as a (void)
function. (The other way round is fine.)