GCC Compilation problem in HP LINUX server

Toon Moene toon@moene.org
Tue Aug 4 18:40:00 GMT 2009


Helge Bahmann wrote:

> On Linux there you can have the zero page mapped by running your program 
> through the following wrapper:
> ---
> #include <linux/personality.h>
> #include <unistd.h>
> 
> main()
> {
>     personality(MMAP_PAGE_ZERO);
>     char *cmd[]={"/path/to/your/broken/app", 0};
>     execv(cmd[0], cmd);
> }
> ---
> This will get you a single page mapped at address zero (depending on the 
> brokenness of your app this may not be enough and you have to map more 
> than that manually).

I hope to not further trouble the waters of what is clearly a "don't do 
that, because it has no meaning" transgression of the (C) language 
definition, but isn't this a VMSious problem ?

I.e., getting 0 if you dereference a NULL pointer ?

It's been 20 years (5.4ish) since I last used VMS, but this is what came 
up to my mind when I saw this question ...

Cheers,

-- 
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html



More information about the Gcc-help mailing list