You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(30) |
2
(8) |
3
(5) |
4
(5) |
|
5
(3) |
6
(9) |
7
(5) |
8
(14) |
9
(17) |
10
(27) |
11
(10) |
|
12
(6) |
13
(10) |
14
(7) |
15
(16) |
16
(9) |
17
(14) |
18
(8) |
|
19
(5) |
20
(13) |
21
(21) |
22
(13) |
23
(4) |
24
(1) |
25
(4) |
|
26
(2) |
27
(7) |
28
(4) |
29
(5) |
30
(12) |
|
|
|
From: <sv...@va...> - 2015-04-29 21:11:44
|
Author: florian
Date: Wed Apr 29 22:11:37 2015
New Revision: 15158
Log:
Add a diagram of memory layout and initial segments as
created by VG_(am_startup).
Modified:
branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
Modified: branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_aspacemgr/aspacemgr-linux.c Wed Apr 29 22:11:37 2015
@@ -1558,7 +1558,25 @@
return ok;
}
-/* See description in pub_core_aspacemgr.h */
+
+/* Overall memory layout and initial segments:
+
+ |<------------ addressable ----------->|
+ | |
+ Addr_MIN |<---- client ---->|<---- valgrind ---->| Addr_MAX
+ +-----+------------------+-+------------------+-----+
+ | R | |R| | R |
+ +-----+------------------+-+------------------+-----+
+ 0 ^ ^ ^ ff....ff
+ | | |
+ | | +--- aspacem_maxAddr
+ | +--- aspacem_vStart
+ +--- aspacem_cStart
+ |
+ +--- aspacem_minAddr
+
+ The function returns the highest addressable byte in the client stack.
+*/
Addr VG_(am_startup) ( Addr sp_at_startup )
{
NSegment seg;
|
|
From: <sv...@va...> - 2015-04-29 20:48:56
|
Author: sewardj
Date: Wed Apr 29 21:48:48 2015
New Revision: 15157
Log:
Fix intermittent build error on aarch64-linux caused by inadequate
alignment for some data symbols.
Modified:
trunk/coregrind/m_syswrap/syscall-arm64-linux.S
Modified: trunk/coregrind/m_syswrap/syscall-arm64-linux.S
==============================================================================
--- trunk/coregrind/m_syswrap/syscall-arm64-linux.S (original)
+++ trunk/coregrind/m_syswrap/syscall-arm64-linux.S Wed Apr 29 21:48:48 2015
@@ -157,6 +157,7 @@
VG_(fixup_guest_state_after_syscall_interrupted) can do the
right thing */
+.align 3
.globl ML_(blksys_setup)
.globl ML_(blksys_restart)
.globl ML_(blksys_complete)
|
|
From: <sv...@va...> - 2015-04-29 20:37:37
|
Author: carll
Date: Wed Apr 29 21:37:29 2015
New Revision: 3145
Log:
Improve the error messages for the PPC platform to be more clear when Valgrind detects that
the underlying hardware doesn't have the needed capability. A number of the checks for DFP
support were going to "decode_failure" instead of "decode_noDFP". These issues are also fixed.
The commit is for Bugzilla 338095
Modified:
trunk/priv/guest_ppc_toIR.c
Modified: trunk/priv/guest_ppc_toIR.c
==============================================================================
--- trunk/priv/guest_ppc_toIR.c (original)
+++ trunk/priv/guest_ppc_toIR.c Wed Apr 29 21:37:29 2015
@@ -19158,16 +19158,14 @@
goto decode_success;
case 0x82: // dcmpo, DFP comparison ordered instruction
case 0x282: // dcmpu, DFP comparison unordered instruction
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_compare( theInstr ) )
goto decode_success;
goto decode_failure;
case 0x102: // dctdp - DFP convert to DFP long
case 0x302: // drsp - DFP round to dfp short
case 0x122: // dctfix - DFP convert to fixed
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_fmt_conv( theInstr ))
goto decode_success;
goto decode_failure;
@@ -19178,22 +19176,19 @@
goto decode_success;
goto decode_failure;
case 0x2A2: // dtstsf - DFP number of significant digits
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_significant_digits(theInstr))
goto decode_success;
goto decode_failure;
case 0x142: // ddedpd DFP Decode DPD to BCD
case 0x342: // denbcd DFP Encode BCD to DPD
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_bcd(theInstr))
goto decode_success;
goto decode_failure;
case 0x162: // dxex - Extract exponent
case 0x362: // diex - Insert exponent
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_extract_insert( theInstr ) )
goto decode_success;
goto decode_failure;
@@ -19213,15 +19208,13 @@
switch (opc2) {
case 0x42: // dscli, DFP shift left
case 0x62: // dscri, DFP shift right
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_shift( theInstr ))
goto decode_success;
goto decode_failure;
case 0xc2: // dtstdc, DFP test data class
case 0xe2: // dtstdg, DFP test data group
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_class_test( theInstr ))
goto decode_success;
goto decode_failure;
@@ -19232,21 +19225,18 @@
case 0x3: // dqua - DFP Quantize
case 0x23: // drrnd - DFP Reround
case 0x43: // dquai - DFP Quantize immediate
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_quantize_sig_rrnd( theInstr ) )
goto decode_success;
goto decode_failure;
case 0xA2: // dtstex - DFP Test exponent
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_exponent_test( theInstr ) )
goto decode_success;
goto decode_failure;
case 0x63: // drintx - Round to an integer value
case 0xE3: // drintn - Round to an integer value
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_round( theInstr ) ) {
goto decode_success;
}
@@ -19480,16 +19470,14 @@
goto decode_failure;
case 0x162: // dxexq - DFP Extract exponent
case 0x362: // diexq - DFP Insert exponent
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_extract_insertq( theInstr ))
goto decode_success;
goto decode_failure;
case 0x82: // dcmpoq, DFP comparison ordered instruction
case 0x282: // dcmpuq, DFP comparison unordered instruction
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_compare( theInstr ) )
goto decode_success;
goto decode_failure;
@@ -19498,23 +19486,20 @@
case 0x302: // drdpq - DFP round to dfp Long
case 0x122: // dctfixq - DFP convert to fixed quad
case 0x322: // dcffixq - DFP convert from fixed quad
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_fmt_convq( theInstr ))
goto decode_success;
goto decode_failure;
case 0x2A2: // dtstsfq - DFP number of significant digits
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_significant_digits(theInstr))
goto decode_success;
goto decode_failure;
case 0x142: // ddedpdq DFP Decode DPD to BCD
case 0x342: // denbcdq DFP Encode BCD to DPD
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_bcdq(theInstr))
goto decode_success;
goto decode_failure;
@@ -19589,15 +19574,13 @@
switch (opc2) {
case 0x42: // dscli, DFP shift left
case 0x62: // dscri, DFP shift right
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_shiftq( theInstr ))
goto decode_success;
goto decode_failure;
case 0xc2: // dtstdc, DFP test data class
case 0xe2: // dtstdg, DFP test data group
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_class_test( theInstr ))
goto decode_success;
goto decode_failure;
@@ -19610,8 +19593,7 @@
case 0x3: // dquaq - DFP Quantize Quad
case 0x23: // drrndq - DFP Reround Quad
case 0x43: // dquaiq - DFP Quantize immediate Quad
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_quantize_sig_rrndq( theInstr ))
goto decode_success;
goto decode_failure;
@@ -19621,8 +19603,7 @@
goto decode_failure;
case 0x63: // drintxq - DFP Round to an integer value
case 0xE3: // drintnq - DFP Round to an integer value
- if (!allow_DFP)
- goto decode_failure;
+ if (!allow_DFP) goto decode_noDFP;
if (dis_dfp_roundq( theInstr ))
goto decode_success;
goto decode_failure;
@@ -20252,36 +20233,55 @@
decode_noF:
vassert(!allow_F);
- vex_printf("disInstr(ppc): declined to decode an FP insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found the Floating Point instruction 0x%x that\n"
+ "can't be handled by Valgrind on this host. This instruction\n"
+ "requires a host that supports Floating Point instructions.\n",
+ theInstr);
+ goto not_supported;
decode_noV:
vassert(!allow_V);
- vex_printf("disInstr(ppc): declined to decode an AltiVec insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found an AltiVec or an e500 instruction 0x%x\n"
+ "that can't be handled by Valgrind. If this instruction is an\n"
+ "Altivec instruction, Valgrind must be run on a host that supports"
+ "AltiVec instructions. If the application was compiled for e500, then\n"
+ "unfortunately Valgrind does not yet support e500 instructions.\n",
+ theInstr);
+ goto not_supported;
decode_noVX:
vassert(!allow_VX);
- vex_printf("disInstr(ppc): declined to decode a Power ISA 2.06 insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found the instruction 0x%x that is defined in the\n"
+ "Power ISA 2.06 ABI but can't be handled by Valgrind on this host.\n"
+ "This instruction \nrequires a host that supports the ISA 2.06 ABI.\n",
+ theInstr);
+ goto not_supported;
decode_noFX:
vassert(!allow_FX);
- vex_printf("disInstr(ppc): "
- "declined to decode a GeneralPurpose-Optional insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found the General Purpose-Optional instruction 0x%x\n"
+ "that can't be handled by Valgrind on this host. This instruction\n"
+ "requires a host that supports the General Purpose-Optional instructions.\n",
+ theInstr);
+ goto not_supported;
decode_noGX:
vassert(!allow_GX);
- vex_printf("disInstr(ppc): "
- "declined to decode a Graphics-Optional insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found the Graphics-Optional instruction 0x%x\n"
+ "that can't be handled by Valgrind on this host. This instruction\n"
+ "requires a host that supports the Graphic-Optional instructions.\n",
+ theInstr);
+ goto not_supported;
decode_noDFP:
vassert(!allow_DFP);
- vex_printf("disInstr(ppc): "
- "declined to decode a Decimal Floating Point insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found the decimal floating point (DFP) instruction 0x%x\n"
+ "that can't be handled by Valgrind on this host. This instruction\n"
+ "requires a host that supports DFP instructions.\n",
+ theInstr);
+ goto not_supported;
decode_noP8:
vassert(!allow_isa_2_07);
- vex_printf("disInstr(ppc): "
- "declined to decode a Power 8 insn.\n");
- goto decode_failure;
+ vex_printf("disInstr(ppc): found the Power 8 instruction 0x%x that can't be handled\n"
+ "by Valgrind on this host. This instruction requires a host that\n"
+ "supports Power 8 instructions.\n",
+ theInstr);
+ goto not_supported;
decode_failure:
@@ -20294,6 +20294,7 @@
opc1, opc1, opc2, opc2);
}
+ not_supported:
/* Tell the dispatcher that this insn cannot be decoded, and so has
not been executed, and (is currently) the next to be executed.
CIA should be up-to-date since it made so at the start of each
|
|
From: <sv...@va...> - 2015-04-29 19:35:55
|
Author: florian
Date: Wed Apr 29 20:35:47 2015
New Revision: 15156
Log:
Merge from trunk.
Added:
branches/ASPACEM_TWEAKS/none/tests/linux/brk-overflow1.c
- copied unchanged from r15155, trunk/none/tests/linux/brk-overflow1.c
branches/ASPACEM_TWEAKS/none/tests/linux/brk-overflow1.stderr.exp
- copied unchanged from r15155, trunk/none/tests/linux/brk-overflow1.stderr.exp
branches/ASPACEM_TWEAKS/none/tests/linux/brk-overflow1.vgtest
- copied unchanged from r15155, trunk/none/tests/linux/brk-overflow1.vgtest
branches/ASPACEM_TWEAKS/none/tests/linux/brk-overflow2.c
- copied unchanged from r15155, trunk/none/tests/linux/brk-overflow2.c
branches/ASPACEM_TWEAKS/none/tests/linux/brk-overflow2.stderr.exp
- copied unchanged from r15155, trunk/none/tests/linux/brk-overflow2.stderr.exp
branches/ASPACEM_TWEAKS/none/tests/linux/brk-overflow2.vgtest
- copied unchanged from r15155, trunk/none/tests/linux/brk-overflow2.vgtest
Modified:
branches/ASPACEM_TWEAKS/ (props changed)
branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c
branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
branches/ASPACEM_TWEAKS/memcheck/tests/linux/brk.stderr.exp
branches/ASPACEM_TWEAKS/none/tests/linux/ (props changed)
branches/ASPACEM_TWEAKS/none/tests/linux/Makefile.am
Modified: branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_initimg/initimg-linux.c Wed Apr 29 20:35:47 2015
@@ -567,7 +567,7 @@
VG_(printf)("valgrind: "
"This may be the result of a very large --main-stacksize=\n");
VG_(printf)("valgrind: setting. Cannot continue. Sorry.\n\n");
- VG_(exit)(0);
+ VG_(exit)(1);
}
vg_assert(ok);
Modified: branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c (original)
+++ branches/ASPACEM_TWEAKS/coregrind/m_syswrap/syswrap-generic.c Wed Apr 29 20:35:47 2015
@@ -1185,7 +1185,7 @@
/* Set the new data segment end to NEWBRK. If this succeeds, return
NEWBRK, else return the current data segment end. */
-static Addr do_brk ( Addr newbrk )
+static Addr do_brk ( Addr newbrk, ThreadId tid )
{
NSegment const* aseg;
Addr newbrkP;
@@ -1254,10 +1254,17 @@
vg_assert(delta > 0);
vg_assert(VG_IS_PAGE_ALIGNED(delta));
- Bool overflow; // ignored here
+ Bool overflow;
if (! VG_(am_extend_into_adjacent_reservation_client)( aseg->start, delta,
- &overflow))
+ &overflow)) {
+ if (overflow)
+ VG_(umsg)("brk segment overflow in thread #%d: can't grow to %#lx\n",
+ tid, newbrkP);
+ else
+ VG_(umsg)("Cannot map memory to grow brk segment in thread #%d "
+ "to %#lx\n", tid, newbrkP);
goto bad;
+ }
VG_(brk_limit) = newbrk;
return newbrk;
@@ -2997,7 +3004,7 @@
PRINT("sys_brk ( %#lx )", ARG1);
PRE_REG_READ1(unsigned long, "brk", unsigned long, end_data_segment);
- brk_new = do_brk(ARG1);
+ brk_new = do_brk(ARG1, tid);
SET_STATUS_Success( brk_new );
if (brk_new == ARG1) {
Modified: branches/ASPACEM_TWEAKS/memcheck/tests/linux/brk.stderr.exp
==============================================================================
--- branches/ASPACEM_TWEAKS/memcheck/tests/linux/brk.stderr.exp (original)
+++ branches/ASPACEM_TWEAKS/memcheck/tests/linux/brk.stderr.exp Wed Apr 29 20:35:47 2015
@@ -1,4 +1,6 @@
+brk segment overflow in thread #1: can't grow to 0x........
+brk segment overflow in thread #1: can't grow to 0x........
HEAP SUMMARY:
in use at exit: ... bytes in ... blocks
Modified: branches/ASPACEM_TWEAKS/none/tests/linux/Makefile.am
==============================================================================
--- branches/ASPACEM_TWEAKS/none/tests/linux/Makefile.am (original)
+++ branches/ASPACEM_TWEAKS/none/tests/linux/Makefile.am Wed Apr 29 20:35:47 2015
@@ -5,6 +5,8 @@
EXTRA_DIST = \
blockfault.stderr.exp blockfault.vgtest \
+ brk-overflow1.stderr.exp brk-overflow1.vgtest \
+ brk-overflow2.stderr.exp brk-overflow2.vgtest \
mremap.stderr.exp mremap.stderr.exp-glibc27 mremap.stdout.exp \
mremap.vgtest \
mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \
@@ -14,6 +16,8 @@
check_PROGRAMS = \
blockfault \
+ brk-overflow1 \
+ brk-overflow2 \
mremap \
mremap2 \
mremap3 \
|
|
From: <sv...@va...> - 2015-04-29 12:59:24
|
Author: florian
Date: Wed Apr 29 13:59:16 2015
New Revision: 15155
Log:
Issue an error message if then brk segment overflows.
Added:
trunk/none/tests/linux/brk-overflow1.c
trunk/none/tests/linux/brk-overflow1.stderr.exp
trunk/none/tests/linux/brk-overflow1.vgtest
trunk/none/tests/linux/brk-overflow2.c
trunk/none/tests/linux/brk-overflow2.stderr.exp
trunk/none/tests/linux/brk-overflow2.vgtest
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/memcheck/tests/linux/brk.stderr.exp
trunk/none/tests/linux/ (props changed)
trunk/none/tests/linux/Makefile.am
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c Wed Apr 29 13:59:16 2015
@@ -1185,7 +1185,7 @@
/* Set the new data segment end to NEWBRK. If this succeeds, return
NEWBRK, else return the current data segment end. */
-static Addr do_brk ( Addr newbrk )
+static Addr do_brk ( Addr newbrk, ThreadId tid )
{
NSegment const* aseg;
Addr newbrkP;
@@ -1254,10 +1254,17 @@
vg_assert(delta > 0);
vg_assert(VG_IS_PAGE_ALIGNED(delta));
- Bool overflow; // ignored here
+ Bool overflow;
if (! VG_(am_extend_into_adjacent_reservation_client)( aseg->start, delta,
- &overflow))
+ &overflow)) {
+ if (overflow)
+ VG_(umsg)("brk segment overflow in thread #%d: can't grow to %#lx\n",
+ tid, newbrkP);
+ else
+ VG_(umsg)("Cannot map memory to grow brk segment in thread #%d "
+ "to %#lx\n", tid, newbrkP);
goto bad;
+ }
VG_(brk_limit) = newbrk;
return newbrk;
@@ -2997,7 +3004,7 @@
PRINT("sys_brk ( %#lx )", ARG1);
PRE_REG_READ1(unsigned long, "brk", unsigned long, end_data_segment);
- brk_new = do_brk(ARG1);
+ brk_new = do_brk(ARG1, tid);
SET_STATUS_Success( brk_new );
if (brk_new == ARG1) {
Modified: trunk/memcheck/tests/linux/brk.stderr.exp
==============================================================================
--- trunk/memcheck/tests/linux/brk.stderr.exp (original)
+++ trunk/memcheck/tests/linux/brk.stderr.exp Wed Apr 29 13:59:16 2015
@@ -1,4 +1,6 @@
+brk segment overflow in thread #1: can't grow to 0x........
+brk segment overflow in thread #1: can't grow to 0x........
HEAP SUMMARY:
in use at exit: ... bytes in ... blocks
Modified: trunk/none/tests/linux/Makefile.am
==============================================================================
--- trunk/none/tests/linux/Makefile.am (original)
+++ trunk/none/tests/linux/Makefile.am Wed Apr 29 13:59:16 2015
@@ -5,6 +5,8 @@
EXTRA_DIST = \
blockfault.stderr.exp blockfault.vgtest \
+ brk-overflow1.stderr.exp brk-overflow1.vgtest \
+ brk-overflow2.stderr.exp brk-overflow2.vgtest \
mremap.stderr.exp mremap.stderr.exp-glibc27 mremap.stdout.exp \
mremap.vgtest \
mremap2.stderr.exp mremap2.stdout.exp mremap2.vgtest \
@@ -14,6 +16,8 @@
check_PROGRAMS = \
blockfault \
+ brk-overflow1 \
+ brk-overflow2 \
mremap \
mremap2 \
mremap3 \
Added: trunk/none/tests/linux/brk-overflow1.c
==============================================================================
--- trunk/none/tests/linux/brk-overflow1.c (added)
+++ trunk/none/tests/linux/brk-overflow1.c Wed Apr 29 13:59:16 2015
@@ -0,0 +1,12 @@
+#include <unistd.h>
+
+volatile void *ptr;
+
+/* The default size of the brk segment is 8 MB.
+ Request more than that in a single request. */
+int main()
+{
+ ptr = sbrk(9*1024*1024);
+
+ return 0;
+}
Added: trunk/none/tests/linux/brk-overflow1.stderr.exp
==============================================================================
--- trunk/none/tests/linux/brk-overflow1.stderr.exp (added)
+++ trunk/none/tests/linux/brk-overflow1.stderr.exp Wed Apr 29 13:59:16 2015
@@ -0,0 +1,3 @@
+
+brk segment overflow in thread #1: can't grow to 0x........
+
Added: trunk/none/tests/linux/brk-overflow1.vgtest
==============================================================================
--- trunk/none/tests/linux/brk-overflow1.vgtest (added)
+++ trunk/none/tests/linux/brk-overflow1.vgtest Wed Apr 29 13:59:16 2015
@@ -0,0 +1 @@
+prog: brk-overflow1
Added: trunk/none/tests/linux/brk-overflow2.c
==============================================================================
--- trunk/none/tests/linux/brk-overflow2.c (added)
+++ trunk/none/tests/linux/brk-overflow2.c Wed Apr 29 13:59:16 2015
@@ -0,0 +1,14 @@
+#include <unistd.h>
+
+volatile void *ptr;
+
+/* The default size of the brk segment is 8 MB.
+ Request more than that in a sequence of requests */
+int main()
+{
+ int i;
+ for (i=0; i < 10; ++i) {
+ ptr = sbrk(1024*1024);
+ }
+ return 0;
+}
Added: trunk/none/tests/linux/brk-overflow2.stderr.exp
==============================================================================
--- trunk/none/tests/linux/brk-overflow2.stderr.exp (added)
+++ trunk/none/tests/linux/brk-overflow2.stderr.exp Wed Apr 29 13:59:16 2015
@@ -0,0 +1,5 @@
+
+brk segment overflow in thread #1: can't grow to 0x........
+brk segment overflow in thread #1: can't grow to 0x........
+brk segment overflow in thread #1: can't grow to 0x........
+
Added: trunk/none/tests/linux/brk-overflow2.vgtest
==============================================================================
--- trunk/none/tests/linux/brk-overflow2.vgtest (added)
+++ trunk/none/tests/linux/brk-overflow2.vgtest Wed Apr 29 13:59:16 2015
@@ -0,0 +1 @@
+prog: brk-overflow2
|