|
From: <sv...@va...> - 2007-05-05 11:40:39
|
Author: sewardj
Date: 2007-05-05 12:40:35 +0100 (Sat, 05 May 2007)
New Revision: 6728
Log:
Fix stack overflow which lead to totally mysterious .bss corruption
and hence to segfaulting in vex on ppc32/64-linux in obscure
circumstances. VKI_MAX_PAGE_SIZE is 64k in recent Valgrinds.
Modified:
trunk/coregrind/m_ume.c
Modified: trunk/coregrind/m_ume.c
===================================================================
--- trunk/coregrind/m_ume.c 2007-05-03 21:25:37 UTC (rev 6727)
+++ trunk/coregrind/m_ume.c 2007-05-05 11:40:35 UTC (rev 6728)
@@ -565,8 +565,8 @@
/* returns: 0 = success, non-0 is failure */
static Int load_script(Int fd, const HChar* name, ExeInfo* info)
{
- Char hdr[VKI_MAX_PAGE_SIZE];
- Int len = VKI_PAGE_SIZE;
+ Char hdr[4096];
+ Int len = 4096;
Int eol;
Char* interp;
Char* end;
@@ -640,8 +640,8 @@
{
Int fd, ret;
SysRes res;
- Char buf[VKI_MAX_PAGE_SIZE];
- SizeT bufsz = VKI_PAGE_SIZE, fsz;
+ Char buf[4096];
+ SizeT bufsz = 4096, fsz;
// Check it's readable
res = VG_(open)(exe_name, VKI_O_RDONLY, 0);
|