GNOME Bugzilla – Bug 595094
epiphany crashes and can't be started again on invalid adblock whitelist regex
Last modified: 2011-05-30 23:07:15 UTC
Version: 2.27.92 What were you doing when the application crashed? Adblocker related crash. Distribution: Gentoo Base System release 2.0.1 Gnome Release: 2.27.92 2009-09-11 (Gentoo) BugBuddy Version: 2.26.0 System: Linux 2.6.31-rc5-00470-g85dfd81 #166 SMP Tue Aug 11 13:36:25 EEST 2009 x86_64 X Vendor: The X.Org Foundation X Vendor Release: 10603901 Selinux: No Accessibility: Disabled GTK+ Theme: Clearlooks Compact Icon Theme: gnome GTK+ Modules: canberra-gtk-module, gnomebreakpad Memory status: size: 711454720 vsize: 711454720 resident: 112750592 share: 28950528 rss: 112750592 rss_rlim: 18446744073709551615 CPU usage: start_time: 1252823908 rtime: 44853 utime: 38709 stime: 6144 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100 Backtrace was generated from '/usr/bin/epiphany' [Thread debugging using libthread_db enabled] [New Thread 0x7f9680baf770 (LWP 3924)] [New Thread 0x7f96688f3910 (LWP 3940)] 0x00007f967b43ba4f in __libc_waitpid (pid=7583, stat_loc=0x7fffa1cb86b0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:41 in ../sysdeps/unix/sysv/linux/waitpid.c
+ Trace 217549
Thread 1 (Thread 0x7f9680baf770 (LWP 3924))
I think I've got this bug too. After adding some urls in the ad block plugin's blacklist epiphany crashed. I managed to disable the plugin a few weeks ago but I enabled it just now to submit the bug report. I think this is the same bug as 595255. As a temporary fix could you tell me how to edit the blacklist without epiphany running? I'm not sure where the config files are. I'll upload a stack trace in a minute. https://bugzilla.gnome.org/show_bug.cgi?id=595255
Created attachment 184922 [details] stack trace
Observed the same on debian sid with epi 2.30.6 after entering an invalid regex such as "*.foo.com". The worst part (for your average user) is that epiphany won't re-start again afterwards. This should be quite easy to reproduce and to fix I believe. kauaian: you can edit the file ~/.gnome2/epiphany/extensions/data/adblock/whitelist and remove the offending pattern.
Created attachment 188849 [details] [review] adblock: reset error to NULL if list regexp could not be parsed Reset (freed) error variable to NULL after a regexp parsing error from the whitelist/blacklist file. It's reused in the next loop iteration and if we don't reset it, we get critical warnings when reading further regexp lines, and then crashes when trying to print or free the already-freed error. I have not tested this, but I'm fairly sure this fixes the problem. It is the right thing to do in any case.
Review of attachment 188849 [details] [review]: Looks good. Do you have git access?
Yes, thanks. Pushed: commit feabc53b368c244215d3ba507abe76071f9ef81f Author: Tim-Philipp Müller <tim@centricular.net> Date: Sun May 29 20:36:40 2011 +0100 adblock: reset error to NULL if list regexp could not be parsed Reset (freed) error variable to NULL after a regexp parsing error from the whitelist/blacklist file. It's reused in the next loop iteration and if we don't reset it, we get critical warnings when reading further regexp lines, and then crashes when trying to print or free the already-freed error. https://bugzilla.gnome.org/show_bug.cgi?id=595094