Qemu arm-user dlopen/dlclose problems
Hi,
I have been using arm user part of qemu (cvs snapshot from 08.03.2005) and I have found that if applications use lot of dlopen/dlclose calls they will segfault. If I use smaller buffer for generated code (works with "#define CODE_GEN_BUFFER_SIZE (128 * 1024)") or if I use smaller threshold to flush the translated code buffer (I used "#define CODE_GEN_BUFFER_MAX_SIZE 65355") it will be flushed from time to time and applications will work.
So my guess is that dlclose will unload the module and invalidate some memory references in that modules memory are but the actual instructions will stay on buffer and at some point they are found and used instead of correct ones.
Has anyone else had similiar problems?
ps. At least gtk-query-immodules and pango-querymodules uses this schema to detect if their modules implements correct API and they will segfault at some point. I also created a small test application that will open and close all .so files in /usr/lib directory. It can be fetched from here http://www.scratchbox.org/~vrahkone/dltest.tar.gz.
Signature · 3 lines
Valtteri Rahkonen [email protected] +358 40 5077041