-----Original Message----- > 在 2021年04月02日 08:45, HAGIO KAZUHITO(萩尾 一仁) 写道: > > -----Original Message----- > >> If a same extension(Eg: extensions/trace.so) with two different names are loaded by > >> "extend" command twice, it sometimes segfaults crash. > >> > >> It's because crash uses RTLD_NOW|RTLD_GLOBAL flags of dlopen to load an extension. > >> RTDL_GLOBAL will make symbols defined by this shared object available for > >> symbol resolution of subsequently loaded shared objects. So symbols in subsequently > >> loaded extensions are overwritten by the former loaded one with a same name. > >> Not only can it cause segfaults, but some other unexpected behaviours. > > > > The phenomenon of the first paragraph is an example and a rare situation if > > not on purpose, please let me change the order and generalize a bit more here: > > --- > > The crash utility uses RTLD_NOW|RTLD_GLOBAL flags ... with the same name. > > > > This can cause unexpected behaviors when loading two extension modules that > > have a symbol with the same name. For example, we can reproduce a segmentation > > violation by loading the current trace.so extension module with two different > > names. > > --- > > > > I'll edit when applying. Otherwise, the patch looks good to me. > > This change looks good. For the [PATCH 1/2] Change functions in extensions/echo.c to be static > > Acked-by: Lianbo Jiang <lijiang@xxxxxxxxxx> Applied with a few editing: https://github.com/crash-utility/crash/commit/506da42 Thanks, Kazu -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility