Don't ask why I am not posting this at Stack. So I have this small C program. It returns the address of the environment variable specified in argv[1].
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
printf("%s is at %p\n", argv[1], getenv(argv[1]));
}
What's irritating is that on Ubuntu Linux 2.6.20-15 x86 it returns the same address every time the program is run.
However on Ubuntu Linux 3.2.0-37 x86 it returns a different address each time. So what's new with the new kernel?