Re: [PATCH 2/2] Change constructor and destructor functions of extensions/trace.c to be static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As for this, I've cc'd Hatayama-san, the maintainer of trace.c [1].
Please wait for his response.

The extensions/trace.c was moved to a separate repository [2] and
will be removed from the crash repository soon.

[1] https://crash-utility.github.io/extensions.html#TRACE
[2] https://github.com/fujitsu/crash-trace

Thanks,
Kazu

-----Original Message-----
> Previously extensions/trace.so with two different names loaded by "extend"
> command twice will segfault crash.
> 
> This patch fixed the problem by making related functions static.
> 
> Signed-off-by: Tao Liu <ltao@xxxxxxxxxx>
> ---
>  extensions/trace.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/extensions/trace.c b/extensions/trace.c
> index c33907f..23a9667 100644
> --- a/extensions/trace.c
> +++ b/extensions/trace.c
> @@ -1888,7 +1888,7 @@ static struct command_table_entry command_table[] = {
> 
>  static int ftrace_initialized;
> 
> -void __attribute__((constructor))
> +static void __attribute__((constructor))
>  trace_init(void)
>  {
>  	if (ftrace_init() < 0)
> @@ -1898,7 +1898,7 @@ trace_init(void)
>  	register_extension(command_table);
>  }
> 
> -void __attribute__((destructor))
> +static void __attribute__((destructor))
>  trace_fini(void)
>  {
>  	if (ftrace_initialized)
> --
> 2.29.2


--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux