GNOME Bugzilla – Bug 793512
power: divide by zero on keyboard brightness request
Last modified: 2018-03-02 18:09:08 UTC
Created attachment 368425 [details] [review] power: Fix divide by zero on keyboard Brightness property request gnome-settings-daemon-3.27.90-4.fc28.x86_64.rpm Stack trace of thread 1220: #0 0x000055c66637b6fc gsd_power_backlight_abs_to_percentage (gsd-power) #1 0x000055c66638112f handle_get_property_other (gsd-power) #2 0x00007f8581542f89 invoke_get_all_properties_in_idle_cb (libgio-2.0.so.0) #3 0x00007f8580f5109b g_idle_dispatch (libglib-2.0.so.0) #4 0x00007f8580f5477d g_main_dispatch (libglib-2.0.so.0) #5 0x00007f8580f54b48 g_main_context_iterate (libglib-2.0.so.0) #6 0x00007f8580f54e72 g_main_loop_run (libglib-2.0.so.0) #7 0x00007f8581d5a0a5 gtk_main (libgtk-3.so.0) #8 0x000055c66637adde main (gsd-power) #9 0x00007f857fec31bb __libc_start_main (libc.so.6) #10 0x000055c66637af0a _start (gsd-power) gsd-power is build with G_DISABLE_CHECKS on Fedora so the failsaves in gsd_power_backlight_abs_to_percentage don't work for max_brighness = 0
Created attachment 369199 [details] [review] power: Add test for previous commit This just tries to access the keyboard brightness, which should crash gsd-power without the fix.
Attachment 368425 [details] pushed as 36bc0a4 - power: Fix divide by zero on keyboard Brightness property request Attachment 369199 [details] pushed as c42b68b - power: Add test for previous commit