codegooglecom / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

testsuite: webkit pacrunner crashes #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running the testsuite, the webkit pacrunner segfaults on exit.

A backtrace shows:

dominique@messiah:~/Documents/svn/libproxy> PX_CONFIG_ORDER=config_envvar
PX_MODULE_BLACKLIST="pacrunner_*" PX_MODULE_WHITELIST="pacrunner_webkit"
http_proxy="pac+file://$(pwd)/test.d/libproxy_test_pac_file.test.pac" gdb proxy
GNU gdb (GDB; openSUSE 11.1) 6.8.50.20081120-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>...
(gdb) run http://www.google.com
Starting program: /usr/local/bin/proxy http://www.google.com
[Thread debugging using libthread_db enabled]
direct://

Program received signal SIGSEGV, Segmentation fault.
0xffffffffffffffff in ?? ()
(gdb) bt full
#0  0xffffffffffffffff in ?? ()
No symbol table info available.
#1  0x00007ffff42bcbb6 in ?? () from /usr/lib64/libwebkit-1.0.so.2
No symbol table info available.
#2  0x00007ffff42c4c81 in ?? () from /usr/lib64/libwebkit-1.0.so.2
No symbol table info available.
#3  0x00007ffff4358018 in JSGarbageCollect () from
/usr/lib64/libwebkit-1.0.so.2
No symbol table info available.
#4  0x00007ffff49d345e in ctxs_free () from
/usr/local/lib/libproxy/0.3.0/modules/pacrunner_webkit.so
No locals.
#5  0x00007ffff49d36c9 in _destructor () from
/usr/local/lib/libproxy/0.3.0/modules/pacrunner_webkit.so
No locals.
#6  0x00007ffff7bdbb88 in regfree (self=0x620eb0) at module_manager.c:62
No locals.
#7  0x00007ffff7bdabaa in px_array_free (self=0x621020) at array.c:139
    i = <value optimized out>
#8  0x00007ffff7bdd18b in dict_free (item=0x620f90) at strdict.c:48
    key = 0x621050 "pxPACRunnerModule__0"
#9  0x00007ffff7bdabaa in px_array_free (self=0x6030d0) at array.c:139
    i = <value optimized out>
#10 0x00007ffff7bdd152 in px_strdict_free (self=0x6030b0) at strdict.c:124
No locals.
#11 0x00007ffff7bdbf66 in px_module_manager_free (self=0x603060) at
module_manager.c:134
No locals.
#12 0x00007ffff7bdc377 in px_proxy_factory_free (self=0x603010) at proxy.c:433
No locals.
#13 0x0000000000400de8 in main (argc=2, argv=<value optimized out>) at
proxy.c:140
    pf = <value optimized out>
(gdb) 

Original issue reported on code.google.com by dominiqu...@gmail.com on 27 Jun 2009 at 9:28

GoogleCodeExporter commented 9 years ago
Any objections on this? The garbage collection should be done before we release 
the
context, no?

Tested, test suite passes with this patc.

Index: src/modules/pacrunner_webkit.c
===================================================================
--- src/modules/pacrunner_webkit.c  (revision 400)
+++ src/modules/pacrunner_webkit.c  (working copy)
@@ -121,8 +121,8 @@
 static void ctxs_free(ctxStore *self)
 {
    if (!self) return;
+   JSGarbageCollect(self->ctx);
    JSGlobalContextRelease(self->ctx);
-   JSGarbageCollect(self->ctx);
    px_free(self->pac);
    px_free(self);
 }

Original comment by dominiqu...@gmail.com on 1 Jul 2009 at 11:45

GoogleCodeExporter commented 9 years ago
The fix has been commited. Testsuite passes. (svn rev 404)

Original comment by dominiqu...@gmail.com on 3 Aug 2009 at 5:35

GoogleCodeExporter commented 9 years ago
Is it sure that this issue was fixed?
I'm still facing identical issue now.
The crash occurs while runing webkit on Ubuntu 11.04.

Original comment by shivami...@gmail.com on 26 May 2011 at 1:34