This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"rwxp" permissions for pthread stack and guard pages "---p" leak on ARM


Hello,

Using glibc-2.5, Linux 2.6.24 on ARM Cortex -A8.

I create a ntpl thread with attributes as "detached", and upon
finishing the start routine of the thread it just "returns". (no
pthread_exit call). Sometimes I observe that thread stack and its
guard pages are still visible using /proc/pid/maps entry even after
the thread exited. So in due course of time, as we keep on creating
such threads the process runs out of VM.

I would like to know,

1) Even though the thread was created as "detached" state, what makes
the kernel?, pthread? to keep the thread stack and resources even
after thread exit.
2) Why thread stack should have "rwx" permissions instead of "rw"?

Please let me know for any missing information.

--,
BR,
Ravi Sankar Guntur.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]