Re: Segmentation fault using libtidy (symptoms, diagnosis, and bush medicine cure)

"Nuno Lopes" <[email protected]> Sun, 25 Jun 2006 23:30:35 +0100
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <004001c698a6$fab33740$0100a8c0@pc07653>
> It's been a long time since I did any C coding and I'm not really
> familiar with the Unix library loading rules, especially as they
> pertain to dynamically loading shared libraries so I'm not sure if
> there is a rational explanation for this behaviour.

Its normal, as the symbols are duplicated. Anyway, Ruby could use some of 
dlopen() flags (supported by newer glibcs) to try to avoid such problems. 
PHP uses those glibc tricks to try to avoid these problems (and there are 
many..), although miracles aren't possible, of course :)
I would say that using RTLD_DEEPBIND in Ruby's dlopen mechanism would fix 
your problem.

Anyway, thats why usually the C libraries prefix all their functions with 
the library name..

> I hope this information might be useful in improving libtidy. Please
> let me know if there is anything else I can add.

The problem is: how to "fix" the problem without breaking compatibility with 
older tidy lib versions?

Nuno 


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642