From: Julian Seward Date: Wed, 6 Oct 2010 11:38:01 +0000 (+0000) Subject: When opening an mmaped file to see if it's an ELF file that we should X-Git-Tag: svn/VALGRIND_3_6_0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c72198e0613b777143542b23a8fe3067d5bf56de;p=thirdparty%2Fvalgrind.git When opening an mmaped file to see if it's an ELF file that we should 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 --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 6133fea1fd..28530e245f 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -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;