fvwmorg / fvwm3

FVWM version 3 -- the successor to fvwm2
Other
512 stars 78 forks source link

21 byte memory leak in merge_styles (3 tiny leaks of 7 bytes) #430

Closed Quipyowert2 closed 3 years ago

Quipyowert2 commented 3 years ago

Thanks for reporting your bug here! The following template will help with giving as much information as possible so that it's easier to diagnose and fix.

Upfront Information

Please provide the following information by running the command and providing the output.

What should have happened, but didn't?

Enabling logging

fvwm3 has a means of logging what it's doing. Enabling this when reproducing the issue might help. To do this, either change the means fvwm3 is started by adding -v as in:

fvwm3 -v

or, once fvwm3 has loaded, send SIGUSR2 as in:

pkill -USR2 fvwm3

The resulting logfile can be found in $HOME/.fvwm/fvwm3-output.log

Steps to Reproduce

How can the problem be reproduced?

  1. Compile fvwm3 revision 4405437b
  2. valgrind --leak-check=full --track-origins=no --undef-value-errors=no --fullpath-after=$PWD/ --num-callers=200 --suppressions=fontconfig.supp fvwm/fvwm3 |& less
  3. When Fvwm3 loads, click the background and click Quit then click Quit again from the confirmation dialog that pops up. For this, the following is helpful:

Include your configuration with this issue. My fvwm config is the default fvwm3 config with this line added from a bugreport somewhere (I think from PR #429): *FvwmIconMan*action Mouse 1 N sendcommand "Iconify off", sendcommand "FlipFocus", sendcommand "Raise"

Does Fvwm3 crash?

Yes, it crashed several times when I was adding in the free_style calls but seems to be fine now.

If fvwm3 crashes then check your system for a corefile. This is platform dependant, however, check if:

If you find a corefile, install gdb and run:

gdb /path/to/fvwm3 /path/to/corefile

If you're using coredumpctl then use:

coredumpctl debug

Then from within the (gdb) prompt, issue:

bt full

... and include the output here.

Extra Information

Fontconfig error suppression file (fontconfig.supp in the above Valgrind command):

{
   Fontconfig suppression
   Memcheck:Leak
   match-leak-kinds: definite
   fun:malloc
   ...
   obj:/usr/lib64/libfontconfig.so.1.10.1
   ...
}
{
   Fontconfig suppression 2
   Memcheck:Leak
   match-leak-kinds: definite
   fun:realloc
   ...
   obj:/usr/lib64/libfontconfig.so.1.10.1
   ...
}
ThomasAdam commented 3 years ago

Hi @Quipyowert2

This is causing problems at the moment, and I've reverted the original commit in this PR until the remaining issues can be addressed. See: https://www.mail-archive.com/fvwm-workers@fvwm.org/msg04902.html

Can you take a look?