|
From: <sv...@va...> - 2010-10-06 11:38:11
|
Author: sewardj
Date: 2010-10-06 12:38:01 +0100 (Wed, 06 Oct 2010)
New Revision: 11397
Log:
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.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2010-10-06 11:25:29 UTC (rev 11396)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2010-10-06 11:38:01 UTC (rev 11397)
@@ -727,7 +727,7 @@
/* 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;
|