when calling mmap() with MAP_ANON, the fd argument should be -1
authorSimon Marlow <marlowsd@gmail.com>
Thu, 8 Jan 2009 15:53:41 +0000 (15:53 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 8 Jan 2009 15:53:41 +0000 (15:53 +0000)
might fix #2925

rts/Linker.c

index ef12e3e..ae1da56 100644 (file)
@@ -1744,7 +1744,7 @@ static int ocAllocateSymbolExtras( ObjectCode* oc, int count, int first )
     if( m > n ) // we need to allocate more pages
     {
         oc->symbol_extras = mmapForLinker(sizeof(SymbolExtra) * count, 
-                                          MAP_ANONYMOUS, 0);
+                                          MAP_ANONYMOUS, -1);
     }
     else
     {