Originally posted by: farmand
Hi,
I've a program where argv[0] gets apparently overwritten from time to time. This happens on a production machine which I cannot access and where we cannot use a debugger. In order to find the origin of this corruption, I'd like to write protect this stack page, so that any write access would be turned in a fault.
The system is 64 bits based. When I try to invoke mprotect on my stack page, I get an ENOMEM error. I'm using gcc to generate my program.
On a Linux system (x86 based) I can set the protection using mprotect without trouble.
Is there any way to achieve this on AIX. Or is this a hopeless attempt?
Thanks for your help,
François
#AIX-Forum