¿Alguien sabe dónde están los complementos o extensiones de Firefox en la memoria? ¿Cómo puedo encontrarlos en la memoria?

I am running Firefox with version 10.0.2 on Linux (CentOS). From the memory descriptor (mm_struct) of Firefox, I know the location of Firefox code section. The code of Firefox add-ons or extensions have to be stored somewhere in memory too, and the Firefox application itself must be aware of these code. Does anyone know where Firefox add-ons or extensions are in memory? Are they associated with the code section of Firefox? How can I find them? Thanks for any inputs.

preguntado el 09 de marzo de 12 a las 14:03

1 Respuestas

Extensions are written in JavaScript, so their code would just be on the heap.

respondido 10 mar '12, 16:03

Thank you. Do you know how to find them in memory? - fengwei zhang

Another questions is: Most system has NX protection techniques, and how can extensions be executed in the heap? Thanks! - fengwei zhang

You'd have to work internal data structures to find things in memory. As for NX, there is no barrier to interpreting things with NX. For a JIT, one would flip the NX bit before generating the jitcode and marking it executable... - Boris Zbarsky

Sorry to keep bothering you. I used the memory descriptor (mm_struct) of Firefox and found out the heap location. Next, I want to find out the extension code in heap. Am I supposed to look at the source code of Firefox? I downloaded the source code, it seems like a very big file and I am not familiar with the Firefox source code. Could you please give me some directions where I can find these internal data structures? Many Thanks! - fengwei zhang

I have no idea how to get there from the C heap. The exact place where these things will live in memory completely depends on what the allocator does at runtime. I do suggest looking up how interpreted code works, though.... the "extension code" on the heap is not machine code. - Boris Zbarsky

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.