]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When opening an mmaped file to see if it's an ELF file that we should
authorJulian Seward <jseward@acm.org>
Wed, 6 Oct 2010 11:38:01 +0000 (11:38 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 6 Oct 2010 11:38:01 +0000 (11:38 +0000)
read debuginfo from, use VKI_O_LARGEFILE, so as to ensure the open
succeeds for large files on 32-bit systems.  Fixes #234064.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11397

coregrind/m_debuginfo/debuginfo.c

index 6133fea1fd00de39ffa3a29a003b6edc3c154e2b..28530e245f2b2ffff49b5439de3a1e9a541c12da 100644 (file)
@@ -727,7 +727,7 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV )
    /* Peer at the first few bytes of the file, to see if it is an ELF */
    /* object file. Ignore the file if we do not have read permission. */
    VG_(memset)(buf1k, 0, sizeof(buf1k));
-   fd = VG_(open)( filename, VKI_O_RDONLY, 0 );
+   fd = VG_(open)( filename, VKI_O_RDONLY|VKI_O_LARGEFILE, 0 );
    if (sr_isError(fd)) {
       if (sr_Err(fd) != VKI_EACCES) {
          DebugInfo fake_di;