Changeset d0c91a6 for driver/as.cc


Ignore:
Timestamp:
Jan 15, 2019, 4:16:15 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
c802eb88
Parents:
5e49e47 (diff), c9aba81 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into jenkins-sandbox

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/as.cc

    r5e49e47 rd0c91a6  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
     6//
    77// as.c -- map assembler file, scan for debug information. If found, expand file by one character and insert Cforall
    88//         language code on the N line from the start of the debug information.
    9 // 
     9//
    1010// Author           : Peter A. Buhr
    1111// Created On       : Wed Aug  1 10:49:42 2018
     
    1313// Last Modified On : Sat Sep  8 08:40:16 2018
    1414// Update Count     : 97
    15 // 
     15//
    1616
    1717#include <cstdio>                                                                               // perror
     
    4545
    4646        if ( size ) {                                                                           // cannot map 0 sized file
    47                 char * start = (char *)mmap( NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
     47                char * start = (char *)mmap( NULL, size + 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
    4848                if ( start == (void *)-1 ) { perror( "mmap" ); exit( EXIT_FAILURE ); };
    4949
     
    6565                } // if
    6666
    67                 if ( munmap( start, size ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk
     67                if ( munmap( start, size + 2 ) ) { perror( "munmap" ); exit( EXIT_FAILURE ); }; // update on disk
    6868        } // if
    6969
Note: See TracChangeset for help on using the changeset viewer.