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
(8) |
2
(8) |
3
(15) |
4
(14) |
5
(12) |
6
(40) |
7
(9) |
|
8
(5) |
9
(12) |
10
(9) |
11
(13) |
12
(7) |
13
(7) |
14
(19) |
|
15
(18) |
16
(13) |
17
(16) |
18
(8) |
19
(16) |
20
(16) |
21
(12) |
|
22
(21) |
23
(39) |
24
(27) |
25
(33) |
26
(41) |
27
(17) |
28
(15) |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-23 22:31:41
|
On Mon, Feb 23, 2009 at 10:43 PM, Julian Seward <js...@ac...> wrote:
>
> The memmove (re-)discovery is a good one. But how many of the others
> are simply complaints about "unsigned < 0" or "unsigned >= 0" ?
Just about all of them, that's what the flag does :)
> I'm reluctant to go with a flag which gives complaints for the
> abovementioned two cases. If I am writing some algorithm, and "u" is
> an unsigned thing, then often I want to write
>
> assert(u >= 0 && u < LIMIT);
>
> From the point of view of reading/understanding/reasoning about the code,
> that's imo clearer than the equivalent
>
> assert(u < LIMIT);
>
> and then having to remember that there is also an implied lower limit of
> zero because u is unsigned. And the former is no less efficient since gcc
> will surely fold the first comparison away.
>
> It's also safer if u ever becomes signed for whatever reason. Then it is
> still properly range-checked, whereas with the latter formulation it no
> longer is.
>
> If you want more signedness-checking action from gcc, I would think
> -Wsign-compare is worthwhile. Comparing signed vs unsigned values is
> just asking for trouble, and is something we shouldn't be doing.
That's the warning that occurs the most with -Wextra. I looked at a
few, they were all of this form:
unsigned int n = <a small number>
...
int i;
for (i = 0; i < n; i++) { ... }
The "i < n" comparison is fine for small non-negative values.
This is clearly a matter of taste, as I felt -Wtype-limits was
worthwhile and -Wsign-compare was not, and Julian thought the
opposite.
What it makes me think is that we probably overuse unsigned values.
It's probably better to use signed values for any kind of "count"
variable... more modern languages like Java and Haskell don't have
unsigned integers... sticking with signed ones for the most part might
make things simpler.
N
|
|
From: <sv...@va...> - 2009-02-23 19:15:36
|
Author: bart
Date: 2009-02-23 19:15:32 +0000 (Mon, 23 Feb 2009)
New Revision: 9246
Log:
Minor performance optimization: reduced the number of client objects that are inspected during memory deallocation.
Modified:
trunk/drd/drd_clientobj.c
Modified: trunk/drd/drd_clientobj.c
===================================================================
--- trunk/drd/drd_clientobj.c 2009-02-23 19:12:02 UTC (rev 9245)
+++ trunk/drd/drd_clientobj.c 2009-02-23 19:15:32 UTC (rev 9246)
@@ -187,6 +187,13 @@
return True;
}
+/**
+ * Clean up all client objects p for which their start address p->any.a1 fits
+ * inside the address range [ a1, a2 [.
+ *
+ * @note The implementation of this function relies on the fact that the
+ * data in s_clientobj_set is sorted on the start address of client objects.
+ */
void DRD_(clientobj_stop_using_mem)(const Addr a1, const Addr a2)
{
Addr removed_at;
@@ -197,22 +204,17 @@
if (! DRD_(is_any_suppressed)(a1, a2))
return;
- VG_(OSetGen_ResetIter)(s_clientobj_set);
- p = VG_(OSetGen_Next)(s_clientobj_set);
- for ( ; p != 0; )
+ VG_(OSetGen_ResetIterAt)(s_clientobj_set, &a1);
+ for ( ; (p = VG_(OSetGen_Next)(s_clientobj_set)) != 0 && p->any.a1 < a2; )
{
- if (a1 <= p->any.a1 && p->any.a1 < a2)
- {
- removed_at = p->any.a1;
- clientobj_remove_obj(p);
- /* The above call removes an element from the oset and hence */
- /* invalidates the iterator. Set the iterator back. */
- VG_(OSetGen_ResetIterAt)(s_clientobj_set, &removed_at);
- }
- else
- {
- p = VG_(OSetGen_Next)(s_clientobj_set);
- }
+ tl_assert(a1 <= p->any.a1);
+ removed_at = p->any.a1;
+ clientobj_remove_obj(p);
+ /*
+ * The above call removes an element from the oset and hence
+ * invalidates the iterator. Restore the iterator.
+ */
+ VG_(OSetGen_ResetIterAt)(s_clientobj_set, &removed_at);
}
}
|
|
From: <sv...@va...> - 2009-02-23 19:12:08
|
Author: bart
Date: 2009-02-23 19:12:02 +0000 (Mon, 23 Feb 2009)
New Revision: 9245
Log:
Declared those function arguments that are not modified as const.
Modified:
trunk/coregrind/m_oset.c
trunk/include/pub_tool_oset.h
Modified: trunk/coregrind/m_oset.c
===================================================================
--- trunk/coregrind/m_oset.c 2009-02-23 17:18:58 UTC (rev 9244)
+++ trunk/coregrind/m_oset.c 2009-02-23 19:12:02 UTC (rev 9245)
@@ -174,7 +174,7 @@
}
// Compare the first word of each element. Inlining is *crucial*.
-static inline Word fast_cmp(void* k, AvlNode* n)
+static inline Word fast_cmp(const void* k, const AvlNode* n)
{
UWord w1 = *(UWord*)k;
UWord w2 = *(UWord*)elem_of_node(n);
@@ -785,7 +785,7 @@
// produced VG_(OSetGen_Next) is the smallest key in the map
// >= start_at. Naturally ">=" is defined by the comparison
// function supplied to VG_(OSetGen_Create).
-void VG_(OSetGen_ResetIterAt)(AvlTree* oset, void* k)
+void VG_(OSetGen_ResetIterAt)(AvlTree* oset, const void* k)
{
Int i;
AvlNode *n, *t;
Modified: trunk/include/pub_tool_oset.h
===================================================================
--- trunk/include/pub_tool_oset.h 2009-02-23 17:18:58 UTC (rev 9244)
+++ trunk/include/pub_tool_oset.h 2009-02-23 19:12:02 UTC (rev 9245)
@@ -250,7 +250,7 @@
// produced VG_(OSetGen_Next) is the smallest key in the map
// >= start_at. Naturally ">=" is defined by the comparison
// function supplied to VG_(OSetGen_Create).
-extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, void* key );
+extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, const void* key );
#endif // __PUB_TOOL_OSET_H
|
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 17:53:51
|
On Mon, Feb 23, 2009 at 4:51 PM, Bart Van Assche <bar...@gm...> wrote: > On Mon, Feb 23, 2009 at 12:43 PM, Julian Seward <js...@ac...> wrote: >> If you want more signedness-checking action from gcc, I would think >> -Wsign-compare is worthwhile. Comparing signed vs unsigned values is >> just asking for trouble, and is something we shouldn't be doing. > > While I agree that it's a good idea to evaluate whether we should > enable more gcc warning options in the Valgrind project, I'm not sure > that enabling -Wsign-compare is a good idea. This topic has already > been discussed on the LKML a long time ago. See e.g. > http://lkml.org/lkml/2001/8/30/83. Update: while -Wsign-compare is known for triggering more complaints on valid code than reporting real bugs, as far as I know a list of the Valgrind/VEX source code lines for which -Wsign-compare triggers warnings has not yet been posted. You can find this list below. If anyone wants to start cleaning this up that's fine for me. I do not volunteer however. bb.c:219: warning: comparison between signed and unsigned bb.c:47: warning: comparison between signed and unsigned bb.c:82: warning: comparison between signed and unsigned bbcc.c:101: warning: comparison between signed and unsigned bbcc.c:117: warning: comparison between signed and unsigned bbcc.c:209: warning: comparison between signed and unsigned bbcc.c:285: warning: comparison between signed and unsigned bbcc.c:287: warning: comparison between signed and unsigned bbcc.c:351: warning: comparison between signed and unsigned bbcc.c:54: warning: comparison between signed and unsigned bbcc.c:585: warning: comparison between signed and unsigned bbcc.c:590: warning: comparison between signed and unsigned bbcc.c:818: warning: comparison between signed and unsigned bbcc.c:99: warning: comparison between signed and unsigned callstack.c:104: warning: comparison between signed and unsigned callstack.c:250: warning: comparison between signed and unsigned callstack.c:60: warning: comparison between signed and unsigned callstack.c:94: warning: comparison between signed and unsigned callstack.c:98: warning: comparison between signed and unsigned context.c:208: warning: comparison between signed and unsigned context.c:210: warning: comparison between signed and unsigned context.c:286: warning: signed and unsigned type in conditional expression context.c:292: warning: comparison between signed and unsigned context.c:303: warning: comparison between signed and unsigned context.c:308: warning: comparison between signed and unsigned context.c:334: warning: signed and unsigned type in conditional expression context.c:81: warning: comparison between signed and unsigned debug.c:343: warning: comparison between signed and unsigned debug.c:350: warning: comparison between signed and unsigned debug.c:358: warning: comparison between signed and unsigned debug.c:359: warning: comparison between signed and unsigned debug.c:68: warning: comparison between signed and unsigned dump.c:1528: warning: comparison between signed and unsigned dump.c:1561: warning: comparison between signed and unsigned dump.c:293: warning: comparison between signed and unsigned dump.c:321: warning: comparison between signed and unsigned dump.c:345: warning: comparison between signed and unsigned dump.c:399: warning: comparison between signed and unsigned dump.c:800: warning: comparison between signed and unsigned dump.c:832: warning: comparison between signed and unsigned dump.c:855: warning: comparison between signed and unsigned dump.c:856: warning: comparison between signed and unsigned dump.c:899: warning: comparison between signed and unsigned dump.c:923: warning: comparison between signed and unsigned dump.c:961: warning: comparison between signed and unsigned fn.c:361: warning: comparison between signed and unsigned fn.c:607: warning: comparison between signed and unsigned fn.c:618: warning: comparison between signed and unsigned fn.c:623: warning: comparison between signed and unsigned fn.c:646: warning: comparison between signed and unsigned fn.c:666: warning: comparison between signed and unsigned hg_main.c:1364: warning: comparison between signed and unsigned hg_main.c:2761: warning: comparison between signed and unsigned hg_main.c:4029: warning: comparison between signed and unsigned hg_main.c:842: warning: comparison between signed and unsigned h_main.c:1957: warning: comparison between signed and unsigned h_main.c:3381: warning: comparison between signed and unsigned h_main.c:3400: warning: comparison between signed and unsigned h_main.c:629: warning: comparison between signed and unsigned jumps.c:101: warning: comparison between signed and unsigned jumps.c:53: warning: comparison between signed and unsigned libhb_core.c:1971: warning: comparison between signed and unsigned libhb_core.c:2297: warning: comparison between signed and unsigned libhb_core.c:3445: warning: comparison between signed and unsigned libhb_core.c:3457: warning: comparison between signed and unsigned main.c:676: warning: comparison between signed and unsigned main.c:688: warning: comparison between signed and unsigned m_aspacemgr/aspacemgr-common.c:240: warning: signed and unsigned type in conditional expression m_aspacemgr/aspacemgr-common.c:252: warning: signed and unsigned type in conditional expression m_aspacemgr/aspacemgr-common.c:345: warning: comparison between signed and unsigned m_aspacemgr/aspacemgr-common.c:375: warning: comparison between signed and unsigned m_aspacemgr/aspacemgr-linux.c:761: warning: comparison between signed and unsigned mc_errors.c:1274: warning: comparison between signed and unsigned mc_errors.c:1285: warning: comparison between signed and unsigned mc_errors.c:297: warning: comparison between signed and unsigned mc_leakcheck.c:631: warning: comparison between signed and unsigned mc_leakcheck.c:640: warning: comparison between signed and unsigned mc_machine.c:118: warning: comparison between signed and unsigned mc_machine.c:518: warning: comparison between signed and unsigned mc_machine.c:519: warning: comparison between signed and unsigned mc_machine.c:520: warning: comparison between signed and unsigned mc_machine.c:521: warning: comparison between signed and unsigned mc_machine.c:522: warning: comparison between signed and unsigned mc_machine.c:523: warning: comparison between signed and unsigned mc_machine.c:524: warning: comparison between signed and unsigned mc_machine.c:525: warning: comparison between signed and unsigned mc_machine.c:526: warning: comparison between signed and unsigned mc_machine.c:527: warning: comparison between signed and unsigned mc_machine.c:528: warning: comparison between signed and unsigned mc_machine.c:529: warning: comparison between signed and unsigned mc_machine.c:530: warning: comparison between signed and unsigned mc_machine.c:531: warning: comparison between signed and unsigned mc_machine.c:532: warning: comparison between signed and unsigned mc_machine.c:533: warning: comparison between signed and unsigned mc_machine.c:539: warning: comparison between signed and unsigned mc_machine.c:541: warning: comparison between signed and unsigned mc_machine.c:543: warning: comparison between signed and unsigned mc_machine.c:545: warning: comparison between signed and unsigned mc_machine.c:547: warning: comparison between signed and unsigned mc_machine.c:549: warning: comparison between signed and unsigned mc_machine.c:551: warning: comparison between signed and unsigned mc_machine.c:553: warning: comparison between signed and unsigned mc_machine.c:627: warning: comparison between signed and unsigned mc_machine.c:628: warning: comparison between signed and unsigned mc_machine.c:629: warning: comparison between signed and unsigned mc_machine.c:630: warning: comparison between signed and unsigned mc_machine.c:631: warning: comparison between signed and unsigned mc_machine.c:632: warning: comparison between signed and unsigned mc_machine.c:633: warning: comparison between signed and unsigned mc_machine.c:634: warning: comparison between signed and unsigned mc_machine.c:640: warning: comparison between signed and unsigned mc_machine.c:642: warning: comparison between signed and unsigned mc_machine.c:644: warning: comparison between signed and unsigned mc_machine.c:646: warning: comparison between signed and unsigned mc_machine.c:648: warning: comparison between signed and unsigned mc_machine.c:650: warning: comparison between signed and unsigned mc_machine.c:652: warning: comparison between signed and unsigned mc_machine.c:654: warning: comparison between signed and unsigned mc_main.c:3800: warning: comparison between signed and unsigned mc_main.c:4538: warning: comparison between signed and unsigned mc_main.c:4629: warning: comparison between signed and unsigned m_commandline.c:71: warning: comparison between signed and unsigned m_coredump/coredump-elf.c:437: warning: comparison between signed and unsigned mc_translate.c:192: warning: comparison between signed and unsigned mc_translate.c:209: warning: comparison between signed and unsigned mc_translate.c:235: warning: comparison between signed and unsigned mc_translate.c:246: warning: comparison between signed and unsigned mc_translate.c:3831: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:1457: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:1774: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:2473: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:2978: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:3102: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:535: warning: comparison between signed and unsigned m_debuginfo/debuginfo.c:749: warning: comparison between signed and unsigned m_debuginfo/readdwarf.c:1186: warning: comparison between signed and unsigned m_debuginfo/readdwarf.c:122: warning: comparison between signed and unsigned m_debuginfo/readdwarf.c:3616: warning: comparison between signed and unsigned m_debuginfo/readdwarf.c:3741: warning: comparison between signed and unsigned m_debuginfo/readdwarf.c:504: warning: comparison between signed and unsigned m_debuginfo/readelf.c:1208: warning: comparison between signed and unsigned m_debuginfo/readelf.c:1224: warning: comparison between signed and unsigned m_debuginfo/readelf.c:1232: warning: comparison between signed and unsigned m_debuginfo/readelf.c:1265: warning: comparison between signed and unsigned m_debuginfo/readelf.c:1307: warning: comparison between signed and unsigned m_debuginfo/readelf.c:1325: warning: comparison between signed and unsigned m_debuginfo/storage.c:1370: warning: comparison between signed and unsigned m_debuginfo/storage.c:1397: warning: comparison between signed and unsigned m_execontext.c:140: warning: comparison between signed and unsigned m_execontext.c:192: warning: comparison between signed and unsigned m_execontext.c:193: warning: comparison between signed and unsigned m_execontext.c:194: warning: comparison between signed and unsigned m_execontext.c:203: warning: comparison between signed and unsigned m_execontext.c:204: warning: comparison between signed and unsigned m_execontext.c:205: warning: comparison between signed and unsigned m_execontext.c:340: warning: comparison between signed and unsigned m_execontext.c:358: warning: comparison between signed and unsigned m_execontext.c:402: warning: comparison between signed and unsigned m_hashtable.c:125: warning: comparison between signed and unsigned m_hashtable.c:248: warning: comparison between signed and unsigned m_initimg/initimg-linux.c:792: warning: comparison between signed and unsigned m_libcbase.c:299: warning: comparison between signed and unsigned m_libcbase.c:590: warning: comparison between signed and unsigned m_libcbase.c:590: warning: signed and unsigned type in conditional expression m_libcfile.c:136: warning: signed and unsigned type in conditional expression m_libcfile.c:278: warning: signed and unsigned type in conditional expression m_libcfile.c:365: warning: signed and unsigned type in conditional expression m_libcfile.c:373: warning: signed and unsigned type in conditional expression m_libcfile.c:440: warning: comparison between signed and unsigned m_libcfile.c:446: warning: comparison between signed and unsigned m_libcfile.c:692: warning: signed and unsigned type in conditional expression m_libcfile.c:697: warning: signed and unsigned type in conditional expression m_libcfile.c:723: warning: signed and unsigned type in conditional expression m_libcfile.c:728: warning: signed and unsigned type in conditional expression m_libcfile.c:753: warning: signed and unsigned type in conditional expression m_libcfile.c:759: warning: signed and unsigned type in conditional expression m_libcfile.c:778: warning: signed and unsigned type in conditional expression m_libcfile.c:784: warning: signed and unsigned type in conditional expression m_libcfile.c:803: warning: signed and unsigned type in conditional expression m_libcfile.c:809: warning: signed and unsigned type in conditional expression m_libcfile.c:831: warning: signed and unsigned type in conditional expression m_libcfile.c:838: warning: signed and unsigned type in conditional expression m_libcprint.c:100: warning: comparison between signed and unsigned m_libcprint.c:168: warning: comparison between signed and unsigned m_libcprint.c:94: warning: comparison between signed and unsigned m_libcproc.c:234: warning: signed and unsigned type in conditional expression m_libcproc.c:355: warning: signed and unsigned type in conditional expression m_libcproc.c:365: warning: signed and unsigned type in conditional expression m_libcproc.c:475: warning: comparison between signed and unsigned m_libcproc.c:477: warning: comparison between signed and unsigned m_libcsignal.c:209: warning: signed and unsigned type in conditional expression m_machine.c:117: warning: comparison between signed and unsigned m_machine.c:141: warning: comparison between signed and unsigned m_main.c:1036: warning: comparison between signed and unsigned m_main.c:1059: warning: comparison between signed and unsigned m_main.c:271: warning: comparison between signed and unsigned m_mallocfree.c:1093: warning: comparison between signed and unsigned m_mallocfree.c:1096: warning: comparison between signed and unsigned m_mallocfree.c:1121: warning: comparison between signed and unsigned m_mallocfree.c:1126: warning: comparison between signed and unsigned m_mallocfree.c:1128: warning: comparison between signed and unsigned m_mallocfree.c:1136: warning: comparison between signed and unsigned m_mallocfree.c:1140: warning: comparison between signed and unsigned m_mallocfree.c:1149: warning: comparison between signed and unsigned m_options.c:220: warning: comparison between signed and unsigned ms_main.c:1035: warning: comparison between signed and unsigned ms_main.c:1038: warning: comparison between signed and unsigned ms_main.c:1123: warning: comparison between signed and unsigned ms_main.c:1134: warning: comparison between signed and unsigned ms_main.c:1135: warning: comparison between signed and unsigned ms_main.c:1138: warning: comparison between signed and unsigned ms_main.c:1149: warning: comparison between signed and unsigned ms_main.c:1169: warning: comparison between signed and unsigned ms_main.c:1198: warning: comparison between signed and unsigned ms_main.c:1218: warning: comparison between signed and unsigned ms_main.c:1324: warning: comparison between signed and unsigned ms_main.c:1370: warning: comparison between signed and unsigned ms_main.c:1448: warning: comparison between signed and unsigned ms_main.c:1450: warning: comparison between signed and unsigned ms_main.c:1704: warning: comparison between signed and unsigned ms_main.c:1992: warning: comparison between signed and unsigned ms_main.c:2118: warning: comparison between signed and unsigned ms_main.c:2216: warning: comparison between signed and unsigned ms_main.c:645: warning: comparison between signed and unsigned ms_main.c:671: warning: comparison between signed and unsigned ms_main.c:707: warning: comparison between signed and unsigned ms_main.c:756: warning: comparison between signed and unsigned ms_main.c:824: warning: comparison between signed and unsigned ms_main.c:850: warning: comparison between signed and unsigned ms_main.c:881: warning: comparison between signed and unsigned ms_main.c:948: warning: comparison between signed and unsigned ms_main.c:952: warning: comparison between signed and unsigned m_stacktrace.c:146: warning: comparison between signed and unsigned m_stacktrace.c:219: warning: comparison between signed and unsigned m_stacktrace.c:561: warning: comparison between signed and unsigned m_syscall.c:61: warning: comparison between signed and unsigned m_syscall.c:75: warning: comparison between signed and unsigned m_syswrap/syswrap-generic.c:3609: warning: comparison between signed and unsigned m_syswrap/syswrap-generic.c:3610: warning: comparison between signed and unsigned m_syswrap/syswrap-generic.c:568: warning: comparison between signed and unsigned m_syswrap/syswrap-generic.c:730: warning: comparison between signed and unsigned m_syswrap/syswrap-generic.c:757: warning: comparison between signed and unsigned m_syswrap/syswrap-linux.c:1339: warning: comparison between signed and unsigned m_syswrap/syswrap-linux.c:1372: warning: comparison between signed and unsigned m_syswrap/syswrap-linux.c:2722: warning: comparison between signed and unsigned m_translate.c:1378: warning: comparison between signed and unsigned m_transtab.c:1341: warning: comparison between signed and unsigned m_transtab.c:1372: warning: comparison between signed and unsigned m_transtab.c:1379: warning: comparison between signed and unsigned m_transtab.c:1381: warning: comparison between signed and unsigned m_transtab.c:1390: warning: comparison between signed and unsigned m_transtab.c:1401: warning: comparison between signed and unsigned m_transtab.c:1584: warning: comparison between signed and unsigned m_transtab.c:1614: warning: comparison between signed and unsigned m_transtab.c:1617: warning: comparison between signed and unsigned m_transtab.c:916: warning: comparison between signed and unsigned m_ume/elf.c:143: warning: comparison between signed and unsigned m_ume/elf.c:253: warning: comparison between signed and unsigned m_ume/main.c:110: warning: comparison between signed and unsigned priv/host-amd64/hdefs.c:2003: warning: comparison between signed and unsigned priv/host-amd64/isel.c:157: warning: comparison between signed and unsigned priv/host-amd64/isel.c:165: warning: comparison between signed and unsigned priv/host-amd64/isel.c:278: warning: comparison between signed and unsigned priv/host-arm/isel.c:97: warning: comparison between signed and unsigned priv/host-generic/reg_alloc2.c:1021: warning: comparison between signed and unsigned priv/host-generic/reg_alloc2.c:1067: warning: comparison between signed and unsigned priv/host-generic/reg_alloc2.c:1068: warning: comparison between signed and unsigned priv/host-generic/reg_alloc2.c:1092: warning: comparison between signed and unsigned priv/host-ppc/hdefs.c:2565: warning: signed and unsigned type in conditional expression priv/host-ppc/hdefs.c:2638: warning: signed and unsigned type in conditional expression priv/host-ppc/hdefs.c:281: warning: comparison between signed and unsigned priv/host-ppc/isel.c:290: warning: comparison between signed and unsigned priv/host-ppc/isel.c:299: warning: comparison between signed and unsigned priv/host-x86/isel.c:189: warning: comparison between signed and unsigned priv/host-x86/isel.c:196: warning: comparison between signed and unsigned priv/ir/irdefs.c:1899: warning: comparison between signed and unsigned priv/ir/irdefs.c:2147: warning: comparison between signed and unsigned priv/ir/irdefs.c:2621: warning: comparison between signed and unsigned priv/ir/irdefs.c:2633: warning: comparison between signed and unsigned priv/ir/irdefs.c:830: warning: comparison between signed and unsigned priv/main/vex_main.c:470: warning: comparison between signed and unsigned sg_main.c:344: warning: comparison between signed and unsigned Bart. |
|
From: <sv...@va...> - 2009-02-23 17:19:04
|
Author: sewardj
Date: 2009-02-23 17:18:58 +0000 (Mon, 23 Feb 2009)
New Revision: 9244
Log:
merge r9243:
(exp-ptrcheck) handle sys_fallocate and sys_getresuid32, and
make suppressions for ld.so be a bit more aggressive
Modified:
branches/VALGRIND_3_4_BRANCH/exp-ptrcheck.supp
branches/VALGRIND_3_4_BRANCH/exp-ptrcheck/h_main.c
Modified: branches/VALGRIND_3_4_BRANCH/exp-ptrcheck/h_main.c
===================================================================
--- branches/VALGRIND_3_4_BRANCH/exp-ptrcheck/h_main.c 2009-02-23 16:56:15 UTC (rev 9243)
+++ branches/VALGRIND_3_4_BRANCH/exp-ptrcheck/h_main.c 2009-02-23 17:18:58 UTC (rev 9244)
@@ -2205,6 +2205,7 @@
ADD(0, __NR_exit); /* hmm, why are we still alive? */
ADD(0, __NR_exit_group);
ADD(0, __NR_fadvise64);
+ ADD(0, __NR_fallocate);
ADD(0, __NR_fchmod);
ADD(0, __NR_fchown);
# if defined(__NR_fchown32)
@@ -2252,6 +2253,9 @@
ADD(0, __NR_getppid);
ADD(0, __NR_getresgid);
ADD(0, __NR_getresuid);
+# if defined(__NR_getresuid32)
+ ADD(0, __NR_getresuid32);
+# endif
ADD(0, __NR_getrlimit);
ADD(0, __NR_getrusage);
# if defined(__NR_getsockname)
Modified: branches/VALGRIND_3_4_BRANCH/exp-ptrcheck.supp
===================================================================
--- branches/VALGRIND_3_4_BRANCH/exp-ptrcheck.supp 2009-02-23 16:56:15 UTC (rev 9243)
+++ branches/VALGRIND_3_4_BRANCH/exp-ptrcheck.supp 2009-02-23 17:18:58 UTC (rev 9244)
@@ -17,7 +17,6 @@
exp-ptrcheck:Arith
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
}
{
@@ -40,7 +39,6 @@
exp-ptrcheck:Heap
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
}
{
|
|
From: <sv...@va...> - 2009-02-23 16:56:22
|
Author: sewardj
Date: 2009-02-23 16:56:15 +0000 (Mon, 23 Feb 2009)
New Revision: 9243
Log:
- handle a couple more syscalls, sys_fallocate and sys_getresuid32
- make suppressions for ld.so be a bit more aggressive
Modified:
trunk/exp-ptrcheck.supp
trunk/exp-ptrcheck/h_main.c
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2009-02-23 08:46:42 UTC (rev 9242)
+++ trunk/exp-ptrcheck/h_main.c 2009-02-23 16:56:15 UTC (rev 9243)
@@ -2214,6 +2214,7 @@
ADD(0, __NR_exit); /* hmm, why are we still alive? */
ADD(0, __NR_exit_group);
ADD(0, __NR_fadvise64);
+ ADD(0, __NR_fallocate);
ADD(0, __NR_fchmod);
ADD(0, __NR_fchown);
# if defined(__NR_fchown32)
@@ -2261,6 +2262,9 @@
ADD(0, __NR_getppid);
ADD(0, __NR_getresgid);
ADD(0, __NR_getresuid);
+# if defined(__NR_getresuid32)
+ ADD(0, __NR_getresuid32);
+# endif
ADD(0, __NR_getrlimit);
ADD(0, __NR_getrusage);
# if defined(__NR_getsockname)
Modified: trunk/exp-ptrcheck.supp
===================================================================
--- trunk/exp-ptrcheck.supp 2009-02-23 08:46:42 UTC (rev 9242)
+++ trunk/exp-ptrcheck.supp 2009-02-23 16:56:15 UTC (rev 9243)
@@ -17,7 +17,6 @@
exp-ptrcheck:Arith
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
}
{
@@ -40,7 +39,6 @@
exp-ptrcheck:Heap
obj:/*lib*/ld-2.*so*
obj:/*lib*/ld-2.*so*
- obj:/*lib*/ld-2.*so*
}
{
|
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 15:51:48
|
On Mon, Feb 23, 2009 at 12:43 PM, Julian Seward <js...@ac...> wrote: > If you want more signedness-checking action from gcc, I would think > -Wsign-compare is worthwhile. Comparing signed vs unsigned values is > just asking for trouble, and is something we shouldn't be doing. While I agree that it's a good idea to evaluate whether we should enable more gcc warning options in the Valgrind project, I'm not sure that enabling -Wsign-compare is a good idea. This topic has already been discussed on the LKML a long time ago. See e.g. http://lkml.org/lkml/2001/8/30/83. Bart. |
|
From: Julian S. <js...@ac...> - 2009-02-23 14:45:55
|
> Are you sure that comparing signed and unsigned values does more harm
> that causing a small performance penalty ?
I'm sure it doesn't cause any performance penalty. I imagine it merely
causes gcc to switch from emitting ja/jae/jb/jbe conditional branches
to jl/jle/jg/jge conditional branches. One group does signed comparisons
and the other does unsigned comparisons. I don't remember which is which.
> Additionaly,
> -Wsign-compare will make gcc complain on statements like
>
> assert(u >= 0 && u < LIMIT);
I can't reproduce this:
sewardj@phoenix:~$ cat wsigncmp.c
#include <assert.h>
#define LIMIT 10
unsigned int u;
int main ( void )
{
assert(u >= 0 && u < LIMIT);
return 0;
}
sewardj@phoenix:~$ gcc -Wall -g -O -c wsigncmp.c -Wsign-compare
sewardj@phoenix:~$
My concern about comparison of signed vs unsigned values is that it is
in some sense logically broken -- these are different types. And it is
likely to give confusion/wrong results for values near either the
wraparound boundary (0x00...00 / 0xFF...FF) or the halfway boundary
(0x7F...FF / 0x80...00).
J
|
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 13:15:27
|
On Mon, Feb 23, 2009 at 12:43 PM, Julian Seward <js...@ac...> wrote: > If you want more signedness-checking action from gcc, I would think > -Wsign-compare is worthwhile. Comparing signed vs unsigned values is > just asking for trouble, and is something we shouldn't be doing. Are you sure that comparing signed and unsigned values does more harm that causing a small performance penalty ? Did anyone check the assembler code generated by gcc for such comparisons ? Additionaly, -Wsign-compare will make gcc complain on statements like assert(u >= 0 && u < LIMIT); where u is of type unsigned int and LIMIT is of type signed int. Bart. |
|
From: Julian S. <js...@ac...> - 2009-02-23 13:04:04
|
> [VG_(memmove)] > It has a 50% chance of crashing or looping infinitely. Why? The > condition of the for-loop in the else-branch never fails, because i is > unsigned. Fortunately this function is not actually used anywhere. Apologies to Konstantin, who reported this in December along with a patch, which I totally forgot about :-( > The warning -Wtype-limits finds this problem, and 185 other ones like > it (ie. comparisons that are always true or false) in the core and > tools, and some more in the tests. I've looked at a few of these, > some of them are just redundant assertions that an unsigned value is > greater than zero, but even those are worrying. The memmove (re-)discovery is a good one. But how many of the others are simply complaints about "unsigned < 0" or "unsigned >= 0" ? I'm reluctant to go with a flag which gives complaints for the abovementioned two cases. If I am writing some algorithm, and "u" is an unsigned thing, then often I want to write assert(u >= 0 && u < LIMIT); From the point of view of reading/understanding/reasoning about the code, that's imo clearer than the equivalent assert(u < LIMIT); and then having to remember that there is also an implied lower limit of zero because u is unsigned. And the former is no less efficient since gcc will surely fold the first comparison away. It's also safer if u ever becomes signed for whatever reason. Then it is still properly range-checked, whereas with the latter formulation it no longer is. If you want more signedness-checking action from gcc, I would think -Wsign-compare is worthwhile. Comparing signed vs unsigned values is just asking for trouble, and is something we shouldn't be doing. J |
|
From: Julian S. <js...@ac...> - 2009-02-23 13:04:02
|
> So I'd like to get rid of it, unless someone can identify what it's for. I suspect it was part of some early scheme at having WERROR optionally available. Problem with -Werror is that even just with the normal -Wall, it's impossible to make V compile warning-free on all platforms, and so a hardwired -Werror often breaks the build. I say rm it; I have never used. J |
|
From: <sv...@va...> - 2009-02-23 08:46:46
|
Author: bart
Date: 2009-02-23 08:46:42 +0000 (Mon, 23 Feb 2009)
New Revision: 9242
Log:
Updated expected output files.
Modified:
trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
Modified: trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc
===================================================================
--- trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc 2009-02-23 07:38:33 UTC (rev 9241)
+++ trunk/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc 2009-02-23 08:46:42 UTC (rev 9242)
@@ -139,8 +139,14 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: main (tc20_verifywrap.c:262)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
Destroying locked rwlock: rwlock 0x.........
at 0x........: main (tc20_verifywrap.c:262)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:216)
ERROR SUMMARY: 16 errors from 16 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc
===================================================================
--- trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc 2009-02-23 07:38:33 UTC (rev 9241)
+++ trunk/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc 2009-02-23 08:46:42 UTC (rev 9242)
@@ -170,9 +170,15 @@
Destroying locked mutex: mutex 0x........, recursion count 1, owner 1.
at 0x........: main (tc20_verifywrap.c:262)
+mutex 0x........ was first observed at:
+ at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:145)
Destroying locked rwlock: rwlock 0x.........
at 0x........: main (tc20_verifywrap.c:262)
+rwlock 0x........ was first observed at:
+ at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+ by 0x........: main (tc20_verifywrap.c:216)
[1/1] mutex_trylock recursive mutex 0x........ rc 0 owner 0
[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0
[1/1] mutex_unlock recursive mutex 0x........ rc 1
|
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 08:34:02
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) started at 2009-02-23 02:20:17 EST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 409 tests, 41 stderr failures, 10 stdout failures, 0 post failures == drd/tests/tc20_verifywrap (stderr) drd/tests/tc20_verifywrap2 (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) memcheck/tests/zeropage (stdout) none/tests/faultstatus (stderr) none/tests/linux/mremap (stderr) none/tests/linux/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Last 20 lines of verbose log follow echo cat quote.txt >> priv/main/vex_svnversion.h cat newline.txt >> priv/main/vex_svnversion.h make[4]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/VEX' make -C ../VEX CC="gcc" AR="/usr/bin/ar" \ libvex_ppc32_linux.a \ EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \ -fno-stack-protector" make[4]: Entering directory `/net/home/bart/software/valgrind/nightly/valgrind/VEX' make[4]: *** No rule to make target `libvex_ppc32_linux.a'. Stop. make[4]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/VEX' make[3]: *** [../VEX/libvex_ppc32_linux.a] Error 2 make[3]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/memcheck' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/memcheck' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind' make: *** [all] Error 2 Running regression tests ... cd valgrind && perl tests/vg_regtest --all Job ID = 2251.cell-user.cell.buzz vg_regtest: 'arch_test' is missing. Did you forget to 'make check'? ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short 2009-02-23 02:45:19.000000000 -0500 --- new.short 2009-02-23 03:33:49.000000000 -0500 *************** *** 6,27 **** ! Last 20 lines of verbose log follow echo ! cat quote.txt >> priv/main/vex_svnversion.h ! cat newline.txt >> priv/main/vex_svnversion.h ! make[4]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/VEX' ! make -C ../VEX CC="gcc" AR="/usr/bin/ar" \ ! libvex_ppc32_linux.a \ ! EXTRA_CFLAGS=" -m32 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wdeclaration-after-statement \ ! -fno-stack-protector" ! make[4]: Entering directory `/net/home/bart/software/valgrind/nightly/valgrind/VEX' ! make[4]: *** No rule to make target `libvex_ppc32_linux.a'. Stop. ! make[4]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/VEX' ! make[3]: *** [../VEX/libvex_ppc32_linux.a] Error 2 ! make[3]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/memcheck' ! make[2]: *** [all-recursive] Error 1 ! make[2]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind/memcheck' ! make[1]: *** [all-recursive] Error 1 ! make[1]: Leaving directory `/net/home/bart/software/valgrind/nightly/valgrind' ! make: *** [all] Error 2 ! Running regression tests ... cd valgrind && perl tests/vg_regtest --all ! Job ID = 2251.cell-user.cell.buzz ! vg_regtest: 'arch_test' is missing. Did you forget to 'make check'? --- 6,61 ---- ! Regression test results follow ! ! == 409 tests, 41 stderr failures, 10 stdout failures, 0 post failures == ! drd/tests/tc20_verifywrap (stderr) ! drd/tests/tc20_verifywrap2 (stderr) ! exp-ptrcheck/tests/bad_percentify (stderr) ! exp-ptrcheck/tests/base (stderr) ! exp-ptrcheck/tests/ccc (stderr) ! exp-ptrcheck/tests/fp (stderr) ! exp-ptrcheck/tests/globalerr (stderr) ! exp-ptrcheck/tests/hackedbz2 (stderr) ! exp-ptrcheck/tests/hp_bounds (stderr) ! exp-ptrcheck/tests/hp_dangle (stderr) ! exp-ptrcheck/tests/justify (stderr) ! exp-ptrcheck/tests/partial_bad (stderr) ! exp-ptrcheck/tests/partial_good (stderr) ! exp-ptrcheck/tests/preen_invars (stderr) ! exp-ptrcheck/tests/pth_create (stderr) ! exp-ptrcheck/tests/pth_specific (stderr) ! exp-ptrcheck/tests/realloc (stderr) ! exp-ptrcheck/tests/stackerr (stderr) ! exp-ptrcheck/tests/strcpy (stderr) ! exp-ptrcheck/tests/supp (stderr) ! exp-ptrcheck/tests/tricky (stderr) ! exp-ptrcheck/tests/unaligned (stderr) ! exp-ptrcheck/tests/zero (stderr) ! helgrind/tests/hg05_race2 (stderr) ! helgrind/tests/tc18_semabuse (stderr) ! helgrind/tests/tc20_verifywrap (stderr) ! memcheck/tests/deep_templates (stdout) ! memcheck/tests/leak-cycle (stderr) ! memcheck/tests/leak-tree (stderr) ! memcheck/tests/origin5-bz2 (stderr) ! memcheck/tests/pointer-trace (stderr) ! memcheck/tests/varinfo1 (stderr) ! memcheck/tests/varinfo2 (stderr) ! memcheck/tests/varinfo3 (stderr) ! memcheck/tests/varinfo4 (stderr) ! memcheck/tests/varinfo5 (stderr) ! memcheck/tests/varinfo6 (stderr) ! memcheck/tests/wrap8 (stderr) ! memcheck/tests/zeropage (stdout) ! none/tests/faultstatus (stderr) ! none/tests/linux/mremap (stderr) ! none/tests/linux/mremap2 (stdout) ! none/tests/ppc32/jm-fp (stdout) ! none/tests/ppc32/jm-vmx (stdout) ! none/tests/ppc32/round (stdout) ! none/tests/ppc32/test_gx (stdout) ! none/tests/ppc64/jm-fp (stdout) ! none/tests/ppc64/jm-vmx (stdout) ! none/tests/ppc64/round (stdout) ! none/tests/shell_valid2 (stderr) ! none/tests/shell_valid3 (stderr) ! |
|
From: <sv...@va...> - 2009-02-23 07:38:37
|
Author: njn
Date: 2009-02-23 07:38:33 +0000 (Mon, 23 Feb 2009)
New Revision: 9241
Log:
Merged r9237..r9240 ('make check' warning fixes, mostly) from the trunk.
Modified:
branches/DARWIN/callgrind/fn.c
branches/DARWIN/drd/tests/pth_barrier_race.c
branches/DARWIN/exp-ptrcheck/tests/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/stackerr.c
branches/DARWIN/exp-ptrcheck/tests/tricky.c
branches/DARWIN/massif/ms_main.c
branches/DARWIN/massif/tests/ignored.c
branches/DARWIN/massif/tests/malloc_usable.c
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/malloc_usable.c
branches/DARWIN/memcheck/tests/memalign2.c
branches/DARWIN/memcheck/tests/str_tester.c
branches/DARWIN/none/tests/coolo_sigaction.cpp
branches/DARWIN/none/tests/fdleak_cmsg.c
branches/DARWIN/none/tests/rlimit_nofile.c
branches/DARWIN/none/tests/susphello.c
branches/DARWIN/perf/Makefile.am
branches/DARWIN/perf/tinycc.c
Modified: branches/DARWIN/callgrind/fn.c
===================================================================
--- branches/DARWIN/callgrind/fn.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/callgrind/fn.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -44,6 +44,7 @@
struct chunk_t chunk[];
};
+#if defined(HAVE_ELF)
/* Scan for a pattern in the code of an ELF object.
* If found, return true and set runtime_resolve_{addr,length}
*/
@@ -102,8 +103,9 @@
CLG_DEBUG(1, " found nothing.\n");
return False;
}
-
+#endif // HAVE_ELF
+
/* _ld_runtime_resolve, located in ld.so, needs special handling:
* The jump at end into the resolved function should not be
* represented as a call (as usually done in callgrind with jumps),
Modified: branches/DARWIN/drd/tests/pth_barrier_race.c
===================================================================
--- branches/DARWIN/drd/tests/pth_barrier_race.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/drd/tests/pth_barrier_race.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -12,8 +12,8 @@
#include <pthread.h>
#include <stdlib.h>
+#include <unistd.h>
-
static pthread_barrier_t* barrier;
Modified: branches/DARWIN/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-23 07:38:33 UTC (rev 9241)
@@ -88,7 +88,7 @@
# To make it a bit more realistic, build hackedbz2.c with at
# least some optimisation.
-hackedbz2_CFLAGS = $(AM_CFLAGS) -O
+hackedbz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
# C ones
pth_create_LDADD = -lpthread
Modified: branches/DARWIN/exp-ptrcheck/tests/stackerr.c
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/stackerr.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/exp-ptrcheck/tests/stackerr.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -43,10 +43,11 @@
for (i = 0; i < 7+1; i++) {
a[i] = 0;
}
- char beforebuf[8];
+ {char beforebuf[8];
char buf[8];
char afterbuf[8];
sprintf(buf, "%d", 123456789);
return 1 & ((a[4] + beforea[1] + aftera[1] + beforebuf[1]
+ buf[2] + afterbuf[3]) / 100000) ;
+ }
}
Modified: branches/DARWIN/exp-ptrcheck/tests/tricky.c
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/tricky.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/exp-ptrcheck/tests/tricky.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -8,10 +8,12 @@
// to zero.
int u[20];
int* p = malloc(sizeof(int) * 100);
-
+ int* n;
+ int* x;
+
p[0] = 0; // ok
- int* n = (int*)((long)p + (long)u); // result is n, because near zero!
- int* x = (int*)((long)n - (long)u); // x == p
+ n = (int*)((long)p + (long)u); // result is n, because near zero!
+ x = (int*)((long)n - (long)u); // x == p
x[0] = 0; // ok, originally caused false pos.
return 0;
Modified: branches/DARWIN/massif/ms_main.c
===================================================================
--- branches/DARWIN/massif/ms_main.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/massif/ms_main.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -220,8 +220,6 @@
VG_(message)(Vg_DebugMsg, "Massif: " format, ##args); \
}
-
-
//------------------------------------------------------------//
//--- Statistics ---//
//------------------------------------------------------------//
@@ -370,7 +368,7 @@
// a UInt, but this caused problems on 64-bit machines when it was
// multiplied by a small negative number and then promoted to a
// word-sized type -- it ended up with a value of 4.2 billion. Sigh.
-static SizeT clo_heap_admin = 8;
+static SSizeT clo_heap_admin = 8;
static Bool clo_stacks = False;
static UInt clo_depth = 30;
static double clo_threshold = 1.0; // percentage
@@ -1298,7 +1296,7 @@
// in /usr/include/time.h on Darwin.
static void
take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time my_time,
- Bool is_detailed, Char* what)
+ Bool is_detailed)
{
tl_assert(!is_snapshot_in_use(snapshot));
tl_assert(have_started_executing_code);
@@ -1386,7 +1384,7 @@
// Take the snapshot.
snapshot = & snapshots[next_snapshot_i];
- take_snapshot(snapshot, kind, my_time, is_detailed, what);
+ take_snapshot(snapshot, kind, my_time, is_detailed);
// Record if it was detailed.
if (is_detailed) {
@@ -1503,7 +1501,7 @@
Bool is_custom_alloc = (NULL != p);
SizeT actual_szB, slop_szB;
- if (req_szB < 0) return NULL;
+ if ((SSizeT)req_szB < 0) return NULL;
// Allocate and zero if necessary
if (!p) {
@@ -1746,7 +1744,7 @@
return new_block( tid, NULL, szB, alignB, False );
}
-static void ms_free ( ThreadId tid, void* p )
+static void ms_free ( ThreadId tid __attribute__((unused)), void* p )
{
die_block( p, /*custom_free*/False );
}
@@ -1766,7 +1764,7 @@
return renew_block(tid, p_old, new_szB);
}
-static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
+static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
{
HP_Chunk* hc = VG_(HT_lookup)( malloc_list, (UWord)p );
@@ -1788,7 +1786,7 @@
update_alloc_stats(stack_szB_delta);
}
-static INLINE void new_mem_stack_2(Addr a, SizeT len, Char* what)
+static INLINE void new_mem_stack_2(SizeT len, Char* what)
{
if (have_started_executing_code) {
VERB(3, "<<< new_mem_stack (%ld)", len);
@@ -1799,7 +1797,7 @@
}
}
-static INLINE void die_mem_stack_2(Addr a, SizeT len, Char* what)
+static INLINE void die_mem_stack_2(SizeT len, Char* what)
{
if (have_started_executing_code) {
VERB(3, "<<< die_mem_stack (%ld)", -len);
@@ -1813,22 +1811,22 @@
static void new_mem_stack(Addr a, SizeT len)
{
- new_mem_stack_2(a, len, "stk-new");
+ new_mem_stack_2(len, "stk-new");
}
static void die_mem_stack(Addr a, SizeT len)
{
- die_mem_stack_2(a, len, "stk-die");
+ die_mem_stack_2(len, "stk-die");
}
static void new_mem_stack_signal(Addr a, SizeT len, ThreadId tid)
{
- new_mem_stack_2(a, len, "sig-new");
+ new_mem_stack_2(len, "sig-new");
}
static void die_mem_stack_signal(Addr a, SizeT len)
{
- die_mem_stack_2(a, len, "sig-die");
+ die_mem_stack_2(len, "sig-die");
}
Modified: branches/DARWIN/massif/tests/ignored.c
===================================================================
--- branches/DARWIN/massif/tests/ignored.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/massif/tests/ignored.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -45,5 +45,7 @@
ignore2(x, ignored_x);
x = realloc(ignored_x, 0); // equivalent to 'free(ignored_x)'.
+
+ return 0;
}
Modified: branches/DARWIN/massif/tests/malloc_usable.c
===================================================================
--- branches/DARWIN/massif/tests/malloc_usable.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/massif/tests/malloc_usable.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -9,12 +9,12 @@
int main(void)
{
+# if !defined(_AIX) && !defined(__APPLE__)
// Because our allocations are in multiples of 8 or 16, 99 will round up
// to 104 or 112.
int* x = malloc(99);
- // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX) && !defined(__APPLE__)
+ // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
assert(104 == malloc_usable_size(x) ||
112 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-02-23 07:38:33 UTC (rev 9241)
@@ -226,23 +226,44 @@
wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
writev zeropage
+
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
-# Extra stuff for C tests
+deep_templates_SOURCES = deep_templates.cpp
+deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
+
+long_namespace_xml_SOURCES = long_namespace_xml.cpp
+
memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
-vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fnfns_LDADD = -lm
-wrap6_CFLAGS = $(AM_CFLAGS) -O2
+mismatches_SOURCES = mismatches.cpp
+
+new_nothrow_SOURCES = new_nothrow.cpp
+new_override_SOURCES = new_override.cpp
+
+# This requires optimisation in order to get just one resulting error.
+origin4_many_CFLAGS = $(AM_CFLAGS) -O
+
+# Apply -O so as to run in reasonable time.
+origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
+origin6_fp_CFLAGS = $(AM_CFLAGS) -O
+
# Don't allow GCC to inline memcpy(), because then we can't intercept it
overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
+
str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
+
supp_unknown_SOURCES = badjump.c
supp1_SOURCES = supp.c
supp2_SOURCES = supp.c
+
+vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_LDADD = -lm
+wrap6_CFLAGS = $(AM_CFLAGS) -O2
+
# To make it a bit more realistic, have some optimisation enabled
# for the varinfo tests. We still expect sane results.
varinfo1_CFLAGS = $(AM_CFLAGS) -O
@@ -251,20 +272,7 @@
varinfo4_CFLAGS = $(AM_CFLAGS) -O
varinfo5_CFLAGS = $(AM_CFLAGS) -O
varinfo6_CFLAGS = $(AM_CFLAGS) -O
-# This requires optimisation in order to get just one resulting error.
-origin4_many_CFLAGS = $(AM_CFLAGS) -O
-# Apply -O so as to run in reasonable time.
-origin5_bz2_CFLAGS = $(AM_CFLAGS) -O
-origin6_fp_CFLAGS = $(AM_CFLAGS) -O
-# C++ tests
-mismatches_SOURCES = mismatches.cpp
-new_nothrow_SOURCES = new_nothrow.cpp
-new_override_SOURCES = new_override.cpp
-deep_templates_SOURCES = deep_templates.cpp
-long_namespace_xml_SOURCES = long_namespace_xml.cpp
-deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
-
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
else
@@ -282,89 +290,88 @@
endif
endif
-# Build shared object for wrap7
-wrap7_SOURCES = wrap7.c
-wrap7_DEPENDENCIES = wrap7so.so
+# Build shared object for varinfo5
+varinfo5_SOURCES = varinfo5.c
+varinfo5_DEPENDENCIES = varinfo5so.so
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- wrap7_LDADD = `pwd`/wrap7so.so
- wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- wrap7_LDADD = `pwd`/wrap7so.so
- wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
if VGCONF_OS_IS_DARWIN
- wrap7_LDADD = `pwd`/wrap7so.so
- wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
- wrap7_LDADD = wrap7so.so
- wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) \
+ varinfo5_LDADD = varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
-Wl,-rpath,$(top_builddir)/memcheck/tests
endif
endif
-endif
-wrap7so_so_SOURCES = wrap7so.c
-wrap7so_so_LDADD =
-wrap7so_so_DEPENDENCIES =
-wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic
+varinfo5so_so_SOURCES = varinfo5so.c
+varinfo5so_so_LDADD =
+varinfo5so_so_DEPENDENCIES =
+varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O -Wno-shadow
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
-Wl,-G -Wl,-bnogc
else
if VGCONF_OS_IS_DARWIN
- wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
-dynamiclib -all_load
else
- wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
- -Wl,-soname -Wl,wrap7so.so
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-soname -Wl,varinfo5so.so
endif
endif
endif
-# Build shared object for varinfo5
-varinfo5_SOURCES = varinfo5.c
-varinfo5_DEPENDENCIES = varinfo5so.so
+# Build shared object for wrap7
+wrap7_SOURCES = wrap7.c
+wrap7_DEPENDENCIES = wrap7so.so
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
+ wrap7_LDADD = `pwd`/wrap7so.so
+ wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+ wrap7_LDADD = `pwd`/wrap7so.so
+ wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
else
if VGCONF_OS_IS_DARWIN
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
+ wrap7_LDADD = `pwd`/wrap7so.so
+ wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI)
else
- varinfo5_LDADD = varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
+ wrap7_LDADD = wrap7so.so
+ wrap7_LDFLAGS = $(AM_FLAG_M3264_PRI) \
-Wl,-rpath,$(top_builddir)/memcheck/tests
endif
endif
endif
-varinfo5so_so_SOURCES = varinfo5so.c
-varinfo5so_so_LDADD =
-varinfo5so_so_DEPENDENCIES =
-varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O
+wrap7so_so_SOURCES = wrap7so.c
+wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
+ wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
else
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
-Wl,-G -Wl,-bnogc
else
if VGCONF_OS_IS_DARWIN
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
+ wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -dynamic \
-dynamiclib -all_load
else
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
- -Wl,-soname -Wl,varinfo5so.so
+ wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-soname -Wl,wrap7so.so
endif
endif
endif
+endif
+
Modified: branches/DARWIN/memcheck/tests/malloc_usable.c
===================================================================
--- branches/DARWIN/memcheck/tests/malloc_usable.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/memcheck/tests/malloc_usable.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -9,12 +9,12 @@
int main(void)
{
+# if !defined(_AIX) && !defined(__APPLE__)
// Because Memcheck marks any slop as inaccessible, it doesn't round up
// sizes for malloc_usable_size().
int* x = malloc(99);
- // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX) && !defined(__APPLE__)
+ // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
assert(99 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
assert( 0 == malloc_usable_size((void*)0xdeadbeef));
Modified: branches/DARWIN/memcheck/tests/memalign2.c
===================================================================
--- branches/DARWIN/memcheck/tests/memalign2.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/memcheck/tests/memalign2.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -23,6 +23,13 @@
int main ( void )
{
+# if defined(_AIX)
+ printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
+
+# elif defined(__APPLE__)
+ printf("MacOS X knows about neither memalign() nor posix_memalign().\n");
+
+# else
// Nb: assuming VG_MIN_MALLOC_SZB is 8!
// Should work with both 32-bit and 64-bit pointers, though.
@@ -30,14 +37,6 @@
int res;
assert(sizeof(long int) == sizeof(void*));
-# if defined(_AIX)
- printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
-
-# else
-# if defined(__APPLE__)
- printf("MacOS X knows about neither memalign() nor posix_memalign().\n");
-
-# else
p = memalign(0, 100); assert(0 == (long)p % 8);
p = memalign(1, 100); assert(0 == (long)p % 8);
p = memalign(2, 100); assert(0 == (long)p % 8);
@@ -78,7 +77,6 @@
res = PM(&p, 4097, 100); assert(EINVAL == res);
# endif
-# endif
return 0;
}
Modified: branches/DARWIN/memcheck/tests/str_tester.c
===================================================================
--- branches/DARWIN/memcheck/tests/str_tester.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/memcheck/tests/str_tester.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -1059,7 +1059,7 @@
}
}
-#if !defined(_AIX)
+#if !defined(_AIX) && !defined(__APPLE__)
static void
test_mempcpy (void)
{
@@ -1463,7 +1463,7 @@
/* memmove - must work on overlap. */
test_memmove ();
-# if !defined(_AIX)
+# if !defined(_AIX) && !defined(__APPLE__)
/* mempcpy */
test_mempcpy ();
# endif
Modified: branches/DARWIN/none/tests/coolo_sigaction.cpp
===================================================================
--- branches/DARWIN/none/tests/coolo_sigaction.cpp 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/none/tests/coolo_sigaction.cpp 2009-02-23 07:38:33 UTC (rev 9241)
@@ -42,11 +42,12 @@
{
int i;
char buffer[200];
+ size_t dummy_size_t;
setupHandlers();
FILE *p = popen("echo Hallo World", "r");
while (!feof(p)) {
int n = fread(buffer, 200, 1, p);
- write(2, buffer, n);
+ dummy_size_t = write(2, buffer, n);
}
fclose(p);
for (i = 0; i < 1000000; i++) ;
Modified: branches/DARWIN/none/tests/fdleak_cmsg.c
===================================================================
--- branches/DARWIN/none/tests/fdleak_cmsg.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/none/tests/fdleak_cmsg.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -18,7 +18,7 @@
# include <memory.h>
#endif
-
+#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/un.h>
@@ -59,7 +59,7 @@
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- sprintf(addr.sun_path, sock);
+ sprintf(addr.sun_path, "%s", sock);
unlink(addr.sun_path);
if(bind(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
@@ -135,7 +135,7 @@
}
addr.sun_family = AF_UNIX;
- sprintf(addr.sun_path, sock);
+ sprintf(addr.sun_path, "%s", sock);
do {
count++;
Modified: branches/DARWIN/none/tests/rlimit_nofile.c
===================================================================
--- branches/DARWIN/none/tests/rlimit_nofile.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/none/tests/rlimit_nofile.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -37,14 +37,16 @@
if (newrlim.rlim_cur != oldrlim.rlim_cur / 2)
{
- fprintf(stderr, "rlim_cur is %lu (should be %lu)\n",
- newrlim.rlim_cur, oldrlim.rlim_cur / 2);
+ fprintf(stderr, "rlim_cur is %llu (should be %llu)\n",
+ (unsigned long long)newrlim.rlim_cur,
+ (unsigned long long)oldrlim.rlim_cur / 2);
}
if (newrlim.rlim_max != oldrlim.rlim_max)
{
- fprintf(stderr, "rlim_max is %lu (should be %lu)\n",
- newrlim.rlim_max, oldrlim.rlim_max);
+ fprintf(stderr, "rlim_max is %llu (should be %llu)\n",
+ (unsigned long long)newrlim.rlim_max,
+ (unsigned long long)oldrlim.rlim_max);
}
newrlim.rlim_cur -= 3; /* allow for stdin, stdout and stderr */
Modified: branches/DARWIN/none/tests/susphello.c
===================================================================
--- branches/DARWIN/none/tests/susphello.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/none/tests/susphello.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -316,6 +316,7 @@
#else
+#include <stdio.h>
int main(int argc, char **argv) {
printf("PASSED\n");
return 0;
Modified: branches/DARWIN/perf/Makefile.am
===================================================================
--- branches/DARWIN/perf/Makefile.am 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/perf/Makefile.am 2009-02-23 07:38:33 UTC (rev 9241)
@@ -23,7 +23,9 @@
AM_CXXFLAGS = $(AM_CFLAGS)
# Extra stuff
-fbench_CFLAGS = $(AM_FLAG_M3264_PRI) -g -O2
+bz2_CFLAGS = $(AM_CFLAGS) -Wno-inline
+
+fbench_CFLAGS = $(AM_CFLAGS) -O2
ffbench_LDADD = -lm
-tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow
+tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow -Wno-inline
Modified: branches/DARWIN/perf/tinycc.c
===================================================================
--- branches/DARWIN/perf/tinycc.c 2009-02-23 07:28:54 UTC (rev 9240)
+++ branches/DARWIN/perf/tinycc.c 2009-02-23 07:38:33 UTC (rev 9241)
@@ -59,6 +59,12 @@
//#endif /* !CONFIG_TCCBOOT */
+// Dummy variables used to avoid warnings like these:
+// warning: ignoring return value of ‘fwrite’, declared with attribute
+// warn_unused_result
+char* dummy_char_star;
+size_t dummy_size_t;
+
// njn: inlined elf.h
//#include "elf.h"
//---------------------------------------------------------------------------
@@ -14839,7 +14845,7 @@
section_sym = put_elf_sym(symtab_section, 0, 0,
ELF32_ST_INFO(STB_LOCAL, STT_SECTION), 0,
text_section->sh_num, NULL);
- getcwd(buf, sizeof(buf));
+ dummy_char_star = getcwd(buf, sizeof(buf));
pstrcat(buf, sizeof(buf), "/");
put_stabs_r(buf, N_SO, 0, 0,
text_section->data_offset, text_section, section_sym);
@@ -19193,7 +19199,7 @@
offset++;
}
size = s->sh_size;
- fwrite(s->data, 1, size, f);
+ dummy_size_t = fwrite(s->data, 1, size, f);
offset += size;
}
}
@@ -19776,8 +19782,8 @@
ehdr.e_shnum = shnum;
ehdr.e_shstrndx = shnum - 1;
- fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
- fwrite(phdr, 1, phnum * sizeof(Elf32_Phdr), f);
+ dummy_size_t = fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
+ dummy_size_t = fwrite(phdr, 1, phnum * sizeof(Elf32_Phdr), f);
offset = sizeof(Elf32_Ehdr) + phnum * sizeof(Elf32_Phdr);
for(i=1;i<s1->nb_sections;i++) {
@@ -19788,7 +19794,7 @@
offset++;
}
size = s->sh_size;
- fwrite(s->data, 1, size, f);
+ dummy_size_t = fwrite(s->data, 1, size, f);
offset += size;
}
}
@@ -19816,7 +19822,7 @@
sh->sh_offset = s->sh_offset;
sh->sh_size = s->sh_size;
}
- fwrite(sh, 1, sizeof(Elf32_Shdr), f);
+ dummy_size_t = fwrite(sh, 1, sizeof(Elf32_Shdr), f);
}
} else {
tcc_output_binary(s1, f, section_order);
@@ -19838,7 +19844,7 @@
data = tcc_malloc(size);
lseek(fd, file_offset, SEEK_SET);
- read(fd, data, size);
+ dummy_size_t = read(fd, data, size);
return data;
}
@@ -19975,7 +19981,7 @@
unsigned char *ptr;
lseek(fd, file_offset + sh->sh_offset, SEEK_SET);
ptr = section_ptr_add(s, size);
- read(fd, ptr, size);
+ dummy_size_t = read(fd, ptr, size);
} else {
s->data_offset += size;
}
@@ -20157,7 +20163,7 @@
unsigned long file_offset;
/* skip magic which was already checked */
- read(fd, magic, sizeof(magic));
+ dummy_size_t = read(fd, magic, sizeof(magic));
for(;;) {
len = read(fd, &hdr, sizeof(hdr));
@@ -20212,7 +20218,7 @@
const char *name, *soname, *p;
DLLReference *dllref;
- read(fd, &ehdr, sizeof(ehdr));
+ dummy_size_t = read(fd, &ehdr, sizeof(ehdr));
/* test CPU specific stuff */
if (ehdr.e_ident[5] != ELFDATA2LSB ||
@@ -20600,7 +20606,7 @@
void rt_error(ucontext_t *uc, const char *fmt, ...)
{
va_list ap;
- unsigned long pc;
+ unsigned long pc = 0; // shut gcc up
int i;
va_start(ap, fmt);
|
|
From: <sv...@va...> - 2009-02-23 07:28:57
|
Author: njn Date: 2009-02-23 07:28:54 +0000 (Mon, 23 Feb 2009) New Revision: 9240 Log: Another 'make check' warning fix. Modified: trunk/none/tests/susphello.c Modified: trunk/none/tests/susphello.c =================================================================== --- trunk/none/tests/susphello.c 2009-02-23 07:26:15 UTC (rev 9239) +++ trunk/none/tests/susphello.c 2009-02-23 07:28:54 UTC (rev 9240) @@ -20,7 +20,7 @@ #include <unistd.h> #include <dlfcn.h> -#include <stdio.h> + #include <pthread.h> #include <unistd.h> #include <string.h> |
|
From: <sv...@va...> - 2009-02-23 07:26:18
|
Author: njn
Date: 2009-02-23 07:26:15 +0000 (Mon, 23 Feb 2009)
New Revision: 9239
Log:
More 'make check' warning fixes.
Modified:
trunk/none/tests/rlimit_nofile.c
Modified: trunk/none/tests/rlimit_nofile.c
===================================================================
--- trunk/none/tests/rlimit_nofile.c 2009-02-23 07:17:08 UTC (rev 9238)
+++ trunk/none/tests/rlimit_nofile.c 2009-02-23 07:26:15 UTC (rev 9239)
@@ -44,8 +44,9 @@
if (newrlim.rlim_max != oldrlim.rlim_max)
{
- fprintf(stderr, "rlim_max is %lu (should be %lu)\n",
- newrlim.rlim_max, oldrlim.rlim_max);
+ fprintf(stderr, "rlim_max is %llu (should be %llu)\n",
+ (unsigned long long)newrlim.rlim_max,
+ (unsigned long long)oldrlim.rlim_max);
}
newrlim.rlim_cur -= 3; /* allow for stdin, stdout and stderr */
|
|
From: Konstantin S. <kon...@gm...> - 2009-02-23 07:20:08
|
On Mon, Feb 23, 2009 at 9:30 AM, Nicholas Nethercote
<n.n...@gm...> wrote:
> Hi,
>
> This code is from coregrind/m_libcbase.c:
>
> void* VG_(memmove)(void *dest, const void *src, SizeT sz)
> {
> SizeT i;
> if (sz == 0)
> return dest;
> if (dest < src) {
> for (i = 0; i < sz; i++) {
> ((UChar*)dest)[i] = ((UChar*)src)[i];
> }
> }
> else if (dest > src) {
> for (i = sz - 1; i >= 0; i--) {
> ((UChar*)dest)[i] = ((UChar*)src)[i];
> }
> }
> return dest;
> }
>
> It has a 50% chance of crashing or looping infinitely. Why? The
> condition of the for-loop in the else-branch never fails, because i is
> unsigned. Fortunately this function is not actually used anywhere.
Anywhere in the trunk -- yes.
But I've hit this crash in Dec when I started using STL in valgrind
(STL uses memmove).
The patch I use is this:
else if (dest > src) {
UChar *d = (UChar*)dest + sz - 1;
UChar *s = (UChar*)src + sz - 1;
for (; d >= (UChar*)dest; d--, s--) {
*d = *s;
}
}
>
> The warning -Wtype-limits finds this problem, and 185 other ones like
> it (ie. comparisons that are always true or false) in the core and
> tools, and some more in the tests. I've looked at a few of these,
> some of them are just redundant assertions that an unsigned value is
> greater than zero, but even those are worrying.
>
> I'd like to turn this warning on. Possibly via -Wextra, which brings
> some other warnings into the mix, but if so then -Wno-sign-compare and
> -Wno-unused-parameter would also be needed to avoid lots of IMHO
> unimportant warnings. Thoughts?
--kcc
>
> Nick
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
|
|
From: <sv...@va...> - 2009-02-23 07:17:12
|
Author: njn
Date: 2009-02-23 07:17:08 +0000 (Mon, 23 Feb 2009)
New Revision: 9238
Log:
Fix some more 'make check' warnings, ones that appear on non-Linux
platforms.
Modified:
trunk/massif/tests/malloc_usable.c
trunk/memcheck/tests/malloc_usable.c
trunk/memcheck/tests/memalign2.c
trunk/none/tests/rlimit_nofile.c
trunk/none/tests/susphello.c
trunk/perf/tinycc.c
Modified: trunk/massif/tests/malloc_usable.c
===================================================================
--- trunk/massif/tests/malloc_usable.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/massif/tests/malloc_usable.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -5,12 +5,12 @@
int main(void)
{
+# if !defined(_AIX)
// Because our allocations are in multiples of 8 or 16, 99 will round up
// to 104 or 112.
int* x = malloc(99);
// XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX)
assert(104 == malloc_usable_size(x) ||
112 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
Modified: trunk/memcheck/tests/malloc_usable.c
===================================================================
--- trunk/memcheck/tests/malloc_usable.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/memcheck/tests/malloc_usable.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -5,12 +5,12 @@
int main(void)
{
+# if !defined(_AIX)
// Because Memcheck marks any slop as inaccessible, it doesn't round up
// sizes for malloc_usable_size().
int* x = malloc(99);
- // DDD: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
-# if !defined(_AIX)
+ // XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
assert(99 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
assert( 0 == malloc_usable_size((void*)0xdeadbeef));
Modified: trunk/memcheck/tests/memalign2.c
===================================================================
--- trunk/memcheck/tests/memalign2.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/memcheck/tests/memalign2.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -19,6 +19,10 @@
int main ( void )
{
+# if defined(_AIX)
+ printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
+
+# else
// Nb: assuming VG_MIN_MALLOC_SZB is 8!
// Should work with both 32-bit and 64-bit pointers, though.
@@ -26,10 +30,6 @@
int res;
assert(sizeof(long int) == sizeof(void*));
-# if defined(_AIX)
- printf("AIX 5.2 knows about neither memalign() nor posix_memalign().\n");
-
-# else
p = memalign(0, 100); assert(0 == (long)p % 8);
p = memalign(1, 100); assert(0 == (long)p % 8);
p = memalign(2, 100); assert(0 == (long)p % 8);
Modified: trunk/none/tests/rlimit_nofile.c
===================================================================
--- trunk/none/tests/rlimit_nofile.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/none/tests/rlimit_nofile.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -37,8 +37,9 @@
if (newrlim.rlim_cur != oldrlim.rlim_cur / 2)
{
- fprintf(stderr, "rlim_cur is %lu (should be %lu)\n",
- newrlim.rlim_cur, oldrlim.rlim_cur / 2);
+ fprintf(stderr, "rlim_cur is %llu (should be %llu)\n",
+ (unsigned long long)newrlim.rlim_cur,
+ (unsigned long long)oldrlim.rlim_cur / 2);
}
if (newrlim.rlim_max != oldrlim.rlim_max)
Modified: trunk/none/tests/susphello.c
===================================================================
--- trunk/none/tests/susphello.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/none/tests/susphello.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -20,7 +20,7 @@
#include <unistd.h>
#include <dlfcn.h>
-
+#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <string.h>
Modified: trunk/perf/tinycc.c
===================================================================
--- trunk/perf/tinycc.c 2009-02-23 06:44:51 UTC (rev 9237)
+++ trunk/perf/tinycc.c 2009-02-23 07:17:08 UTC (rev 9238)
@@ -20606,7 +20606,7 @@
void rt_error(ucontext_t *uc, const char *fmt, ...)
{
va_list ap;
- unsigned long pc;
+ unsigned long pc = 0; // shut gcc up
int i;
va_start(ap, fmt);
|
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 07:14:33
|
On Mon, Feb 23, 2009 at 5:43 AM, Nicholas Nethercote <n.n...@gm...> wrote: > Pretty much every file in Valgrind gets $(WERROR) as part of the > compile flags. But I can't work out what it's for -- that string > isn't present in the info pages for automake, autoconf or make, nor is > it defined in configure.in or any of our generated Makefiles. AFAICT > it's always empty (at least, on Linux and Darwin where I've checked). > > So I'd like to get rid of it, unless someone can identify what it's for. My guess is that this flag can be used as follows (I don't use this flag): make WERROR=-Werror Bart. |
|
From: Bart V. A. <bar...@gm...> - 2009-02-23 07:13:06
|
On Mon, Feb 23, 2009 at 7:30 AM, Nicholas Nethercote <n.n...@gm...> wrote: > I'd like to turn this warning on. Possibly via -Wextra, which brings > some other warnings into the mix, but if so then -Wno-sign-compare and > -Wno-unused-parameter would also be needed to avoid lots of IMHO > unimportant warnings. Thoughts? Regarding -Wextra: older gcc versions only understood -W, newer understand both -W and -Wextra. That is why I added a test to configure.in for this flag (FLAG_W_EXTRA). Please keep in mind that the exact meaning of -Wextra changes with each gcc version. An alternative is to specify each desired warning option explicitly. But this also implies that support for warning flags must be tested before each flag is used, or that more configure tests for compiler flags will have to be added. Bart. |
|
From: <sv...@va...> - 2009-02-23 06:45:04
|
Author: njn
Date: 2009-02-23 06:44:51 +0000 (Mon, 23 Feb 2009)
New Revision: 9237
Log:
Get rid of all "make check" compile warnings, except for the ones from
fxtract.c.
Also, gets rid of some of the warnings that -Wextra finds in Massif.
Modified:
trunk/drd/tests/pth_barrier_race.c
trunk/exp-ptrcheck/tests/Makefile.am
trunk/exp-ptrcheck/tests/stackerr.c
trunk/exp-ptrcheck/tests/tricky.c
trunk/massif/ms_main.c
trunk/memcheck/tests/Makefile.am
trunk/none/tests/coolo_sigaction.cpp
trunk/none/tests/fdleak_cmsg.c
trunk/perf/Makefile.am
trunk/perf/tinycc.c
Modified: trunk/drd/tests/pth_barrier_race.c
===================================================================
--- trunk/drd/tests/pth_barrier_race.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/drd/tests/pth_barrier_race.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -12,8 +12,8 @@
#include <pthread.h>
#include <stdlib.h>
+#include <unistd.h>
-
static pthread_barrier_t* barrier;
Modified: trunk/exp-ptrcheck/tests/Makefile.am
===================================================================
--- trunk/exp-ptrcheck/tests/Makefile.am 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/exp-ptrcheck/tests/Makefile.am 2009-02-23 06:44:51 UTC (rev 9237)
@@ -80,7 +80,7 @@
# To make it a bit more realistic, build hackedbz2.c with at
# least some optimisation.
-hackedbz2_CFLAGS = $(AM_CFLAGS) -O
+hackedbz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
# C ones
pth_create_LDADD = -lpthread
Modified: trunk/exp-ptrcheck/tests/stackerr.c
===================================================================
--- trunk/exp-ptrcheck/tests/stackerr.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/exp-ptrcheck/tests/stackerr.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -43,10 +43,11 @@
for (i = 0; i < 7+1; i++) {
a[i] = 0;
}
- char beforebuf[8];
+ {char beforebuf[8];
char buf[8];
char afterbuf[8];
sprintf(buf, "%d", 123456789);
return 1 & ((a[4] + beforea[1] + aftera[1] + beforebuf[1]
+ buf[2] + afterbuf[3]) / 100000) ;
+ }
}
Modified: trunk/exp-ptrcheck/tests/tricky.c
===================================================================
--- trunk/exp-ptrcheck/tests/tricky.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/exp-ptrcheck/tests/tricky.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -8,10 +8,12 @@
// to zero.
int u[20];
int* p = malloc(sizeof(int) * 100);
-
+ int* n;
+ int* x;
+
p[0] = 0; // ok
- int* n = (int*)((long)p + (long)u); // result is n, because near zero!
- int* x = (int*)((long)n - (long)u); // x == p
+ n = (int*)((long)p + (long)u); // result is n, because near zero!
+ x = (int*)((long)n - (long)u); // x == p
x[0] = 0; // ok, originally caused false pos.
return 0;
Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/massif/ms_main.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -220,8 +220,6 @@
VG_(message)(Vg_DebugMsg, "Massif: " format, ##args); \
}
-
-
//------------------------------------------------------------//
//--- Statistics ---//
//------------------------------------------------------------//
@@ -358,7 +356,7 @@
// a UInt, but this caused problems on 64-bit machines when it was
// multiplied by a small negative number and then promoted to a
// word-sized type -- it ended up with a value of 4.2 billion. Sigh.
-static SizeT clo_heap_admin = 8;
+static SSizeT clo_heap_admin = 8;
static Bool clo_stacks = False;
static UInt clo_depth = 30;
static double clo_threshold = 1.0; // percentage
@@ -1262,7 +1260,7 @@
// snapshot, or what kind of snapshot, are made elsewhere.
static void
take_snapshot(Snapshot* snapshot, SnapshotKind kind, Time time,
- Bool is_detailed, Char* what)
+ Bool is_detailed)
{
tl_assert(!is_snapshot_in_use(snapshot));
tl_assert(have_started_executing_code);
@@ -1348,7 +1346,7 @@
// Take the snapshot.
snapshot = & snapshots[next_snapshot_i];
- take_snapshot(snapshot, kind, time, is_detailed, what);
+ take_snapshot(snapshot, kind, time, is_detailed);
// Record if it was detailed.
if (is_detailed) {
@@ -1465,7 +1463,7 @@
Bool is_custom_alloc = (NULL != p);
SizeT actual_szB, slop_szB;
- if (req_szB < 0) return NULL;
+ if ((SSizeT)req_szB < 0) return NULL;
// Allocate and zero if necessary
if (!p) {
@@ -1667,7 +1665,7 @@
return new_block( tid, NULL, szB, alignB, False );
}
-static void ms_free ( ThreadId tid, void* p )
+static void ms_free ( ThreadId tid __attribute__((unused)), void* p )
{
die_block( p, /*custom_free*/False );
}
@@ -1687,7 +1685,7 @@
return renew_block(tid, p_old, new_szB);
}
-static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
+static SizeT ms_malloc_usable_size ( ThreadId tid, void* p )
{
HP_Chunk* hc = VG_(HT_lookup)( malloc_list, (UWord)p );
@@ -1709,7 +1707,7 @@
update_alloc_stats(stack_szB_delta);
}
-static INLINE void new_mem_stack_2(Addr a, SizeT len, Char* what)
+static INLINE void new_mem_stack_2(SizeT len, Char* what)
{
if (have_started_executing_code) {
VERB(3, "<<< new_mem_stack (%ld)", len);
@@ -1720,7 +1718,7 @@
}
}
-static INLINE void die_mem_stack_2(Addr a, SizeT len, Char* what)
+static INLINE void die_mem_stack_2(SizeT len, Char* what)
{
if (have_started_executing_code) {
VERB(3, "<<< die_mem_stack (%ld)", -len);
@@ -1734,22 +1732,22 @@
static void new_mem_stack(Addr a, SizeT len)
{
- new_mem_stack_2(a, len, "stk-new");
+ new_mem_stack_2(len, "stk-new");
}
static void die_mem_stack(Addr a, SizeT len)
{
- die_mem_stack_2(a, len, "stk-die");
+ die_mem_stack_2(len, "stk-die");
}
static void new_mem_stack_signal(Addr a, SizeT len, ThreadId tid)
{
- new_mem_stack_2(a, len, "sig-new");
+ new_mem_stack_2(len, "sig-new");
}
static void die_mem_stack_signal(Addr a, SizeT len)
{
- die_mem_stack_2(a, len, "sig-die");
+ die_mem_stack_2(len, "sig-die");
}
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/memcheck/tests/Makefile.am 2009-02-23 06:44:51 UTC (rev 9237)
@@ -226,23 +226,44 @@
wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
writev zeropage
+
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
-# Extra stuff for C tests
+deep_templates_SOURCES = deep_templates.cpp
+deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
+
+long_namespace_xml_SOURCES = long_namespace_xml.cpp
+
memcmptest_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcmp
-vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
-vcpu_fnfns_LDADD = -lm
-wrap6_CFLAGS = $(AM_CFLAGS) -O2
+mismatches_SOURCES = mismatches.cpp
+
+new_nothrow_SOURCES = new_nothrow.cpp
+new_override_SOURCES = new_override.cpp
+
+# This requires optimisation in order to get just one resulting error.
+origin4_many_CFLAGS = $(AM_CFLAGS) -O
+
+# Apply -O so as to run in reasonable time.
+origin5_bz2_CFLAGS = $(AM_CFLAGS) -O -Wno-inline
+origin6_fp_CFLAGS = $(AM_CFLAGS) -O
+
# Don't allow GCC to inline memcpy(), because then we can't intercept it
overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy
+
str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
+
supp_unknown_SOURCES = badjump.c
supp1_SOURCES = supp.c
supp2_SOURCES = supp.c
+
+vcpu_bz2_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fbench_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_CFLAGS = $(AM_CFLAGS) -O2
+vcpu_fnfns_LDADD = -lm
+wrap6_CFLAGS = $(AM_CFLAGS) -O2
+
# To make it a bit more realistic, have some optimisation enabled
# for the varinfo tests. We still expect sane results.
varinfo1_CFLAGS = $(AM_CFLAGS) -O
@@ -251,20 +272,7 @@
varinfo4_CFLAGS = $(AM_CFLAGS) -O
varinfo5_CFLAGS = $(AM_CFLAGS) -O
varinfo6_CFLAGS = $(AM_CFLAGS) -O
-# This requires optimisation in order to get just one resulting error.
-origin4_many_CFLAGS = $(AM_CFLAGS) -O
-# Apply -O so as to run in reasonable time.
-origin5_bz2_CFLAGS = $(AM_CFLAGS) -O
-origin6_fp_CFLAGS = $(AM_CFLAGS) -O
-# C++ tests
-mismatches_SOURCES = mismatches.cpp
-new_nothrow_SOURCES = new_nothrow.cpp
-new_override_SOURCES = new_override.cpp
-deep_templates_SOURCES = deep_templates.cpp
-long_namespace_xml_SOURCES = long_namespace_xml.cpp
-deep_templates_CXXFLAGS = $(AM_CFLAGS) -O -gstabs
-
if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
else
@@ -282,6 +290,36 @@
endif
endif
+# Build shared object for varinfo5
+varinfo5_SOURCES = varinfo5.c
+varinfo5_DEPENDENCIES = varinfo5so.so
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
+else
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
+ varinfo5_LDADD = `pwd`/varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
+else
+ varinfo5_LDADD = varinfo5so.so
+ varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
+ -Wl,-rpath,$(top_builddir)/memcheck/tests
+endif
+endif
+
+varinfo5so_so_SOURCES = varinfo5so.c
+varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O -Wno-shadow
+if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
+else
+if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-G -Wl,-bnogc
+else
+ varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
+ -Wl,-soname -Wl,varinfo5so.so
+endif
+endif
# Build shared object for wrap7
wrap7_SOURCES = wrap7.c
wrap7_DEPENDENCIES = wrap7so.so
@@ -300,8 +338,6 @@
endif
wrap7so_so_SOURCES = wrap7so.c
-wrap7so_so_LDADD =
-wrap7so_so_DEPENDENCIES =
wrap7so_so_CFLAGS = $(AM_CFLAGS) -fpic
if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
wrap7so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
@@ -315,36 +351,4 @@
endif
endif
-# Build shared object for varinfo5
-varinfo5_SOURCES = varinfo5.c
-varinfo5_DEPENDENCIES = varinfo5so.so
-if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI)
-else
-if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- varinfo5_LDADD = `pwd`/varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) -Wl,-G -Wl,-bnogc
-else
- varinfo5_LDADD = varinfo5so.so
- varinfo5_LDFLAGS = $(AM_FLAG_M3264_PRI) \
- -Wl,-rpath,$(top_builddir)/memcheck/tests
-endif
-endif
-varinfo5so_so_SOURCES = varinfo5so.c
-varinfo5so_so_LDADD =
-varinfo5so_so_DEPENDENCIES =
-varinfo5so_so_CFLAGS = $(AM_CFLAGS) -fpic -O
-if VGCONF_PLATFORMS_INCLUDE_PPC64_AIX5
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared
-else
-if VGCONF_PLATFORMS_INCLUDE_PPC32_AIX5
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
- -Wl,-G -Wl,-bnogc
-else
- varinfo5so_so_LDFLAGS = -fpic $(AM_FLAG_M3264_PRI) -shared \
- -Wl,-soname -Wl,varinfo5so.so
-endif
-endif
-
Modified: trunk/none/tests/coolo_sigaction.cpp
===================================================================
--- trunk/none/tests/coolo_sigaction.cpp 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/none/tests/coolo_sigaction.cpp 2009-02-23 06:44:51 UTC (rev 9237)
@@ -42,11 +42,12 @@
{
int i;
char buffer[200];
+ size_t dummy_size_t;
setupHandlers();
FILE *p = popen("echo Hallo World", "r");
while (!feof(p)) {
int n = fread(buffer, 200, 1, p);
- write(2, buffer, n);
+ dummy_size_t = write(2, buffer, n);
}
fclose(p);
for (i = 0; i < 1000000; i++) ;
Modified: trunk/none/tests/fdleak_cmsg.c
===================================================================
--- trunk/none/tests/fdleak_cmsg.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/none/tests/fdleak_cmsg.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -59,7 +59,7 @@
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- sprintf(addr.sun_path, sock);
+ sprintf(addr.sun_path, "%s", sock);
unlink(addr.sun_path);
if(bind(s, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
@@ -135,7 +135,7 @@
}
addr.sun_family = AF_UNIX;
- sprintf(addr.sun_path, sock);
+ sprintf(addr.sun_path, "%s", sock);
do {
count++;
Modified: trunk/perf/Makefile.am
===================================================================
--- trunk/perf/Makefile.am 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/perf/Makefile.am 2009-02-23 06:44:51 UTC (rev 9237)
@@ -23,7 +23,9 @@
AM_CXXFLAGS = $(AM_CFLAGS)
# Extra stuff
-fbench_CFLAGS = $(AM_FLAG_M3264_PRI) -g -O2
+bz2_CFLAGS = $(AM_CFLAGS) -Wno-inline
+
+fbench_CFLAGS = $(AM_CFLAGS) -O2
ffbench_LDADD = -lm
-tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow
+tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow -Wno-inline
Modified: trunk/perf/tinycc.c
===================================================================
--- trunk/perf/tinycc.c 2009-02-23 04:29:37 UTC (rev 9236)
+++ trunk/perf/tinycc.c 2009-02-23 06:44:51 UTC (rev 9237)
@@ -59,6 +59,12 @@
//#endif /* !CONFIG_TCCBOOT */
+// Dummy variables used to avoid warnings like these:
+// warning: ignoring return value of ‘fwrite’, declared with attribute
+// warn_unused_result
+char* dummy_char_star;
+size_t dummy_size_t;
+
// njn: inlined elf.h
//#include "elf.h"
//---------------------------------------------------------------------------
@@ -14839,7 +14845,7 @@
section_sym = put_elf_sym(symtab_section, 0, 0,
ELF32_ST_INFO(STB_LOCAL, STT_SECTION), 0,
text_section->sh_num, NULL);
- getcwd(buf, sizeof(buf));
+ dummy_char_star = getcwd(buf, sizeof(buf));
pstrcat(buf, sizeof(buf), "/");
put_stabs_r(buf, N_SO, 0, 0,
text_section->data_offset, text_section, section_sym);
@@ -19193,7 +19199,7 @@
offset++;
}
size = s->sh_size;
- fwrite(s->data, 1, size, f);
+ dummy_size_t = fwrite(s->data, 1, size, f);
offset += size;
}
}
@@ -19776,8 +19782,8 @@
ehdr.e_shnum = shnum;
ehdr.e_shstrndx = shnum - 1;
- fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
- fwrite(phdr, 1, phnum * sizeof(Elf32_Phdr), f);
+ dummy_size_t = fwrite(&ehdr, 1, sizeof(Elf32_Ehdr), f);
+ dummy_size_t = fwrite(phdr, 1, phnum * sizeof(Elf32_Phdr), f);
offset = sizeof(Elf32_Ehdr) + phnum * sizeof(Elf32_Phdr);
for(i=1;i<s1->nb_sections;i++) {
@@ -19788,7 +19794,7 @@
offset++;
}
size = s->sh_size;
- fwrite(s->data, 1, size, f);
+ dummy_size_t = fwrite(s->data, 1, size, f);
offset += size;
}
}
@@ -19816,7 +19822,7 @@
sh->sh_offset = s->sh_offset;
sh->sh_size = s->sh_size;
}
- fwrite(sh, 1, sizeof(Elf32_Shdr), f);
+ dummy_size_t = fwrite(sh, 1, sizeof(Elf32_Shdr), f);
}
} else {
tcc_output_binary(s1, f, section_order);
@@ -19838,7 +19844,7 @@
data = tcc_malloc(size);
lseek(fd, file_offset, SEEK_SET);
- read(fd, data, size);
+ dummy_size_t = read(fd, data, size);
return data;
}
@@ -19975,7 +19981,7 @@
unsigned char *ptr;
lseek(fd, file_offset + sh->sh_offset, SEEK_SET);
ptr = section_ptr_add(s, size);
- read(fd, ptr, size);
+ dummy_size_t = read(fd, ptr, size);
} else {
s->data_offset += size;
}
@@ -20157,7 +20163,7 @@
unsigned long file_offset;
/* skip magic which was already checked */
- read(fd, magic, sizeof(magic));
+ dummy_size_t = read(fd, magic, sizeof(magic));
for(;;) {
len = read(fd, &hdr, sizeof(hdr));
@@ -20212,7 +20218,7 @@
const char *name, *soname, *p;
DLLReference *dllref;
- read(fd, &ehdr, sizeof(ehdr));
+ dummy_size_t = read(fd, &ehdr, sizeof(ehdr));
/* test CPU specific stuff */
if (ehdr.e_ident[5] != ELFDATA2LSB ||
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-23 06:31:04
|
Hi,
This code is from coregrind/m_libcbase.c:
void* VG_(memmove)(void *dest, const void *src, SizeT sz)
{
SizeT i;
if (sz == 0)
return dest;
if (dest < src) {
for (i = 0; i < sz; i++) {
((UChar*)dest)[i] = ((UChar*)src)[i];
}
}
else if (dest > src) {
for (i = sz - 1; i >= 0; i--) {
((UChar*)dest)[i] = ((UChar*)src)[i];
}
}
return dest;
}
It has a 50% chance of crashing or looping infinitely. Why? The
condition of the for-loop in the else-branch never fails, because i is
unsigned. Fortunately this function is not actually used anywhere.
The warning -Wtype-limits finds this problem, and 185 other ones like
it (ie. comparisons that are always true or false) in the core and
tools, and some more in the tests. I've looked at a few of these,
some of them are just redundant assertions that an unsigned value is
greater than zero, but even those are worrying.
I'd like to turn this warning on. Possibly via -Wextra, which brings
some other warnings into the mix, but if so then -Wno-sign-compare and
-Wno-unused-parameter would also be needed to avoid lots of IMHO
unimportant warnings. Thoughts?
Nick
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-23 04:43:44
|
Hi, Pretty much every file in Valgrind gets $(WERROR) as part of the compile flags. But I can't work out what it's for -- that string isn't present in the info pages for automake, autoconf or make, nor is it defined in configure.in or any of our generated Makefiles. AFAICT it's always empty (at least, on Linux and Darwin where I've checked). So I'd like to get rid of it, unless someone can identify what it's for. Nick |
|
From: <sv...@va...> - 2009-02-23 04:29:42
|
Author: njn
Date: 2009-02-23 04:29:37 +0000 (Mon, 23 Feb 2009)
New Revision: 9236
Log:
Comment out all the #warning lines to make compilation less noisy. They're
still easy to find, as they all have both "DDD" and "#warning" in the
comment.
Modified:
branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c
branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c
branches/DARWIN/coregrind/m_libcproc.c
branches/DARWIN/coregrind/m_main.c
branches/DARWIN/coregrind/m_redir.c
branches/DARWIN/coregrind/m_scheduler/scheduler.c
branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c
branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
branches/DARWIN/coregrind/m_signals.c
branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
branches/DARWIN/coregrind/m_translate.c
Modified: branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -2206,7 +2206,7 @@
/* We have been advised that the mapping is allowable at the
specified address. So hand it off to the kernel, and propagate
any resulting failure immediately. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
start, length, prot,
VKI_MAP_FIXED|VKI_MAP_PRIVATE,
@@ -2275,7 +2275,7 @@
/* We have been advised that the mapping is allowable at the
specified address. So hand it off to the kernel, and propagate
any resulting failure immediately. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
start, length, prot,
VKI_MAP_FIXED|VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
@@ -2333,7 +2333,7 @@
/* We have been advised that the mapping is allowable at the
advised address. So hand it off to the kernel, and propagate
any resulting failure immediately. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
advised, length, prot,
VKI_MAP_FIXED|VKI_MAP_PRIVATE|VKI_MAP_ANONYMOUS,
@@ -2793,7 +2793,7 @@
return False;
/* Extend the kernel's mapping. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
nsegments[segR].start, delta,
prot,
@@ -2829,7 +2829,7 @@
return False;
/* Extend the kernel's mapping. */
-#warning GrP fixme MAP_FIXED can clobber memory!
+ // DDD: #warning GrP fixme MAP_FIXED can clobber memory!
sres = VG_(am_do_mmap_NO_NOTIFY)(
nsegments[segA].start-delta, delta,
prot,
Modified: branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_coredump/coredump-amd64-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -35,5 +35,5 @@
void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
{
-#warning GrP fixme coredump
+ // DDD: #warning GrP fixme coredump
}
Modified: branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_coredump/coredump-x86-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -35,5 +35,5 @@
void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size)
{
-#warning GrP fixme coredump
+ // DDD: #warning GrP fixme coredump
}
Modified: branches/DARWIN/coregrind/m_libcproc.c
===================================================================
--- branches/DARWIN/coregrind/m_libcproc.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_libcproc.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -706,7 +706,7 @@
#if defined(__NR_nanosleep)
(void)VG_(do_syscall2)(__NR_nanosleep, (UWord)ts, (UWord)NULL);
#elif defined(VGO_darwin)
-# warning GrP fixme use semwait_signal for nanosleep
+ // DDD: #warning GrP fixme use semwait_signal for nanosleep
#else
# error no nanosleep implementation
#endif
Modified: branches/DARWIN/coregrind/m_main.c
===================================================================
--- branches/DARWIN/coregrind/m_main.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_main.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -2043,7 +2043,7 @@
// Nb: temporarily parks the saved blocking-mask in saved_sigmask.
VG_(debugLog)(1, "main", "Initialise signal management\n");
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(sigstartup_actions)();
#endif
@@ -2279,7 +2279,7 @@
/* We were killed by a fatal signal, so replicate the effect */
vg_assert(VG_(threads)[tid].os_state.fatalsig != 0);
#if defined(VGO_darwin)
-#warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(kill_self)(VG_(threads)[tid].os_state.fatalsig);
#endif
Modified: branches/DARWIN/coregrind/m_redir.c
===================================================================
--- branches/DARWIN/coregrind/m_redir.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_redir.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -963,20 +963,20 @@
/* If we're using memcheck, use these intercepts right from
the start, otherwise dyld makes a lot of noise. */
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
- add_hardwired_spec("dyld", "strcmp",
- (Addr)&VG_(darwin_REDIR_FOR_strcmp), NULL);
- add_hardwired_spec("dyld", "strlen",
- (Addr)&VG_(darwin_REDIR_FOR_strlen), NULL);
- add_hardwired_spec("dyld", "strcat",
- (Addr)&VG_(darwin_REDIR_FOR_strcat), NULL);
- add_hardwired_spec("dyld", "strcpy",
- (Addr)&VG_(darwin_REDIR_FOR_strcpy), NULL);
- add_hardwired_spec("dyld", "strlcat",
- (Addr)&VG_(darwin_REDIR_FOR_strlcat), NULL);
+ add_hardwired_spec("dyld", "strcmp",
+ (Addr)&VG_(darwin_REDIR_FOR_strcmp), NULL);
+ add_hardwired_spec("dyld", "strlen",
+ (Addr)&VG_(darwin_REDIR_FOR_strlen), NULL);
+ add_hardwired_spec("dyld", "strcat",
+ (Addr)&VG_(darwin_REDIR_FOR_strcat), NULL);
+ add_hardwired_spec("dyld", "strcpy",
+ (Addr)&VG_(darwin_REDIR_FOR_strcpy), NULL);
+ add_hardwired_spec("dyld", "strlcat",
+ (Addr)&VG_(darwin_REDIR_FOR_strlcat), NULL);
#if defined(VGP_amd64_darwin)
-#warning fixme rdar://6166275
- add_hardwired_spec("dyld", "arc4random",
- (Addr)&VG_(darwin_REDIR_FOR_arc4random), NULL);
+ // DDD: #warning fixme rdar://6166275
+ add_hardwired_spec("dyld", "arc4random",
+ (Addr)&VG_(darwin_REDIR_FOR_arc4random), NULL);
#endif
}
Modified: branches/DARWIN/coregrind/m_scheduler/scheduler.c
===================================================================
--- branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_scheduler/scheduler.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -430,7 +430,7 @@
VG_(threads)[tid].altstack.ss_flags = VKI_SS_DISABLE;
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
{
vki_sigset_t savedmask;
@@ -879,7 +879,7 @@
if (jumped) {
block_signals(tid);
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(tid);
#endif
@@ -1000,7 +1000,7 @@
/* Look for any pending signals for this thread, and set them up
for delivery */
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(tid);
#endif
@@ -1102,7 +1102,7 @@
segment override use) */
/* jrs 2005 03 11: is this correct? */
#if defined(VGO_darwin)
-# warning GrP fixme synth signals
+ // DDD: #warning GrP fixme synth signals
VG_(core_panic)("mapfail - no synth signals on darwin");
#else
VG_(synth_fault)(tid);
@@ -1167,7 +1167,7 @@
case VEX_TRC_JMP_SIGSEGV:
#if defined(VGO_darwin)
-# warning GrP fixme synth signals
+ // DDD: #warning GrP fixme synth signals
VG_(core_panic)("sigsegv - no synth signals on darwin");
#else
VG_(synth_fault)(tid);
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-amd64-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1 +1 @@
-#warning fixme
+// DDD: #warning fixme
Modified: branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_sigframe/sigframe-x86-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1 +1 @@
-#warning fixme
+// DDD: #warning fixme
Modified: branches/DARWIN/coregrind/m_signals.c
===================================================================
--- branches/DARWIN/coregrind/m_signals.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_signals.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -112,7 +112,7 @@
#if defined(VGO_darwin)
-#warning GrP fixme signals
+// DDD: #warning GrP fixme signals
#else
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-amd64-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -92,9 +92,9 @@
static void x86_float_state64_from_vex(x86_float_state64_t *mach,
VexGuestAMD64State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
- VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 16 * sizeof(mach->__fpu_xmm0));
+ VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 16 * sizeof(mach->__fpu_xmm0));
}
@@ -134,7 +134,7 @@
vex->guest_RSI = mach->__rsi;
vex->guest_RBP = mach->__rbp;
vex->guest_RSP = mach->__rsp;
-#warning GrP fixme eflags
+ // DDD: #warning GrP fixme eflags
vex->guest_RIP = mach->__rip;
vex->guest_R8 = mach->__r8;
vex->guest_R9 = mach->__r9;
@@ -154,7 +154,7 @@
static void x86_float_state64_to_vex(const x86_float_state64_t *mach,
VexGuestAMD64State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
VG_(memcpy)(&vex->guest_XMM0, &mach->__fpu_xmm0, 16 * sizeof(mach->__fpu_xmm0));
}
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -775,7 +775,7 @@
//tst->sys_flags &= ~SfMayBlock;
break;
-#warning GrP fixme darwin-specific ioctl
+ // DDD: #warning GrP fixme darwin-specific ioctl
case VKI_FIODTYPE:
PRE_MEM_WRITE( "ioctl(FIONREAD)", ARG3, sizeof(int) );
break;
@@ -902,7 +902,7 @@
case VKI_SIOCSPGRP:
break;
-#warning GrP fixme darwin-specific ioctl
+ // DDD: #warning GrP fixme darwin-specific ioctl
case VKI_FIODTYPE:
POST_MEM_WRITE( ARG3, sizeof(int) );
break;
@@ -2116,8 +2116,8 @@
ML_(buf_and_len_pre_check) ( tid, optval_p, optlen_p,
"socketcall.getsockopt(optval)",
"socketcall.getsockopt(optlen)" );
-# warning GrP fixme darwin-specific sockopts
}
+ // DDD: #warning GrP fixme darwin-specific sockopts
}
POST(sys_getsockopt)
@@ -2129,7 +2129,7 @@
ML_(buf_and_len_post_check) ( tid, VG_(mk_SysRes_Success)(RES),
optval_p, optlen_p,
"socketcall.getsockopt(optlen_out)" );
-# warning GrP fixme darwin-specific sockopts
+ // DDD: #warning GrP fixme darwin-specific sockopts
}
}
@@ -2783,7 +2783,7 @@
oldset = (vki_sigset_t*)ARG3;
#if defined(VGO_darwin)
-#warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
SET_STATUS_from_SysRes(
VG_(do_sys_sigprocmask) ( tid, ARG1 /*how*/, set, oldset)
@@ -2817,7 +2817,7 @@
PRE_MEM_WRITE( "sigaltstack(oss)", ARG2, sizeof(vki_stack_t) );
}
-# warning GrP fixme signals
+ // DDD: # warning GrP fixme signals
// GrP fixme leopard 9A241 setjmp dies if sigaltstack fails (ecx)
SET_STATUS_Success(0);
}
@@ -4876,7 +4876,7 @@
MACH_ARG(mach_vm_protect.size));
UInt prot = MACH_ARG(mach_vm_protect.new_protection);
if (MACH_ARG(mach_vm_protect.set_maximum)) {
-#warning GrP fixme mprotect max
+ // DDD: #warning GrP fixme mprotect max
//VG_(mprotect_max_range)(start, end-start, prot);
} else {
ML_(notify_aspacem_and_tool_of_mprotect)(start, end-start, prot);
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -774,7 +774,7 @@
void VG_(init_preopened_fds)(void)
{
#if defined(VGO_darwin)
-# warning GrP fixme preopened fds
+ // DDD: #warning GrP fixme preopened fds
#else
Int ret;
struct vki_dirent d;
@@ -2454,7 +2454,7 @@
/* Let other thread(s) run */
VG_(vg_yield)();
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
VG_(poll_signals)(self);
#endif
@@ -2629,7 +2629,7 @@
VG_(setrlimit)(VKI_RLIMIT_DATA, &VG_(client_rlimit_data));
#if defined(VGO_darwin)
-# warning GrP fixme exec signals busted
+ // DDD: #warning GrP fixme exec signals busted
#else
/*
Set the signal state up for exec.
@@ -4056,7 +4056,7 @@
}
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: #warning GrP fixme signals
#else
SET_STATUS_from_SysRes(
VG_(do_sys_sigaltstack) (tid, (vki_stack_t*)ARG1,
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-main.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1704,7 +1704,7 @@
might have been created, and will have set SfPollAfter to
request a poll for them once the syscall is done. */
#if defined(VGO_darwin)
-# warning GrP fixme signals
+ // DDD: # warning GrP fixme signals
#else
if (sci->flags & SfPollAfter)
VG_(poll_signals)(tid);
@@ -1849,7 +1849,7 @@
int $0x80 == CD 80
int $0x80 == CD 81
*/
-#warning GrP fixme sysenter, int $0x81, int $0x82
+ // DDD: #warning GrP fixme sysenter, int $0x81, int $0x82
{
UChar *p = (UChar *)arch->vex.guest_EIP;
@@ -1862,7 +1862,7 @@
}
#elif defined(VGP_amd64_darwin)
-#warning GrP fixme amd64 restart unimplemented
+ // DDD: #warning GrP fixme amd64 restart unimplemented
vg_assert(0);
#else
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-x86-darwin.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -85,9 +85,9 @@
static void x86_float_state32_from_vex(i386_float_state_t *mach,
VexGuestX86State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
- VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 8 * sizeof(mach->__fpu_xmm0));
+ VG_(memcpy)(&mach->__fpu_xmm0, &vex->guest_XMM0, 8 * sizeof(mach->__fpu_xmm0));
}
@@ -128,7 +128,7 @@
vex->guest_EBP = mach->__ebp;
vex->guest_ESP = mach->__esp;
vex->guest_SS = mach->__ss;
-#warning GrP fixme eflags
+ // DDD: #warning GrP fixme eflags
vex->guest_EIP = mach->__eip;
vex->guest_CS = mach->__cs;
vex->guest_DS = mach->__ds;
@@ -140,7 +140,7 @@
static void x86_float_state32_to_vex(const i386_float_state_t *mach,
VexGuestX86State *vex)
{
-#warning GrP fixme fp state
+ // DDD: #warning GrP fixme fp state
VG_(memcpy)(&vex->guest_XMM0, &mach->__fpu_xmm0, 8 * sizeof(mach->__fpu_xmm0));
}
Modified: branches/DARWIN/coregrind/m_translate.c
===================================================================
--- branches/DARWIN/coregrind/m_translate.c 2009-02-23 04:16:56 UTC (rev 9235)
+++ branches/DARWIN/coregrind/m_translate.c 2009-02-23 04:29:37 UTC (rev 9236)
@@ -1361,7 +1361,7 @@
/* U R busted, sonny. Place your hands on your head and step
away from the orig_addr. */
#if defined(VGO_darwin)
-#warning GrP fixme synth signals
+ // DDD: #warning GrP fixme synth signals
{
VG_(message)(Vg_UserMsg, "ERROR\n");
VG_(message)(Vg_UserMsg, "Thread %d jumped to bad address %#llx",
|
|
From: <sv...@va...> - 2009-02-23 04:17:04
|
Author: njn
Date: 2009-02-23 04:16:56 +0000 (Mon, 23 Feb 2009)
New Revision: 9235
Log:
Merged part of r9234 (unit_libcbase improvements) from the DARWIN branch.
Modified:
trunk/memcheck/tests/unit_libcbase.c
Modified: trunk/memcheck/tests/unit_libcbase.c
===================================================================
--- trunk/memcheck/tests/unit_libcbase.c 2009-02-23 04:14:34 UTC (rev 9234)
+++ trunk/memcheck/tests/unit_libcbase.c 2009-02-23 04:16:56 UTC (rev 9235)
@@ -6,38 +6,40 @@
#include "coregrind/m_libcbase.c"
+#define CHECK(x) \
+ if (!x) { fprintf(stderr, "failure: %s:%d\n", __FILE__, __LINE__); }
void test_isXYZ(void)
{
- assert( VG_(isspace)(' ') );
- assert( VG_(isspace)('\n') );
- assert( VG_(isspace)('\t') );
- assert( ! VG_(isspace)('3') );
- assert( ! VG_(isspace)('x') );
+ CHECK( VG_(isspace)(' ') );
+ CHECK( VG_(isspace)('\n') );
+ CHECK( VG_(isspace)('\t') );
+ CHECK( ! VG_(isspace)('3') );
+ CHECK( ! VG_(isspace)('x') );
- assert( VG_(isdigit)('0') );
- assert( VG_(isdigit)('1') );
- assert( VG_(isdigit)('5') );
- assert( VG_(isdigit)('9') );
- assert( ! VG_(isdigit)('a') );
- assert( ! VG_(isdigit)('!') );
+ CHECK( VG_(isdigit)('0') );
+ CHECK( VG_(isdigit)('1') );
+ CHECK( VG_(isdigit)('5') );
+ CHECK( VG_(isdigit)('9') );
+ CHECK( ! VG_(isdigit)('a') );
+ CHECK( ! VG_(isdigit)('!') );
}
void test_is_XYZ_digit()
{
Long x;
- assert( is_dec_digit('0', &x) && 0 == x );
- assert( is_dec_digit('1', &x) && 1 == x );
- assert( is_dec_digit('9', &x) && 9 == x );
+ CHECK( is_dec_digit('0', &x) && 0 == x );
+ CHECK( is_dec_digit('1', &x) && 1 == x );
+ CHECK( is_dec_digit('9', &x) && 9 == x );
- assert( is_hex_digit('0', &x) && 0 == x );
- assert( is_hex_digit('1', &x) && 1 == x );
- assert( is_hex_digit('9', &x) && 9 == x );
- assert( is_hex_digit('a', &x) && 10 == x );
- assert( is_hex_digit('f', &x) && 15 == x );
- assert( is_hex_digit('A', &x) && 10 == x );
- assert( is_hex_digit('F', &x) && 15 == x );
+ CHECK( is_hex_digit('0', &x) && 0 == x );
+ CHECK( is_hex_digit('1', &x) && 1 == x );
+ CHECK( is_hex_digit('9', &x) && 9 == x );
+ CHECK( is_hex_digit('a', &x) && 10 == x );
+ CHECK( is_hex_digit('f', &x) && 15 == x );
+ CHECK( is_hex_digit('A', &x) && 10 == x );
+ CHECK( is_hex_digit('F', &x) && 15 == x );
}
void test_strtoll(void)
@@ -90,8 +92,8 @@
long long res2 = strtoll (a[i].str, &endptr2, 10);
//printf("res1 = %lld, *endptr1 = '%c'\n", res1, *endptr1);
//printf("res2 = %lld, *endptr2 = '%c'\n", res2, *endptr2);
- assert(a[i].res == res1 && a[i].endptr_val == *endptr1);
- assert(res2 == res1 && *endptr2 == *endptr1);
+ CHECK(a[i].res == res1 && a[i].endptr_val == *endptr1);
+ CHECK(res2 == res1 && *endptr2 == *endptr1);
}
}
@@ -145,60 +147,13 @@
long long res2 = strtoll (a[i].str, &endptr2, 16);
//printf(" res1 = %lld, *endptr1 = '%c'\n", res1, *endptr1);
//printf(" res2 = %lld, *endptr2 = '%c'\n", res2, *endptr2);
- assert(a[i].res == res1 && a[i].endptr_val == *endptr1);
- assert(res2 == res1 && *endptr2 == *endptr1);
+ CHECK(a[i].res == res1 && a[i].endptr_val == *endptr1);
+ CHECK(res2 == res1 && *endptr2 == *endptr1);
}
}
- // VG_(strtod)()
- {
- StrtollInputs a[] = {
- // If there's no number at the head of the string, return 0, and
- // make 'endptr' point to the start of the string.
- { str : "", res : 0, endptr_val : '\0' },
- { str : " \n\t", res : 0, endptr_val : ' ' },
- { str : "one", res : 0, endptr_val : 'o' },
- { str : "\ntwo", res : 0, endptr_val : '\n' },
- // Successful conversion. Leading whitespace is ignored. A single
- // '-' or '+' is accepted. "0X" and "0x" are also allowed at the
- // front, but if no digits follow, just the "0" is converted.
- { str : "0", res : 0, endptr_val : '\0' },
- { str : "0", res : 0, endptr_val : '\0' },
- { str : "+0", res : 0, endptr_val : '\0' },
- { str : "-0", res : 0, endptr_val : '\0' },
- { str : "1", res : 1, endptr_val : '\0' },
- { str : "+1", res : 1, endptr_val : '\0' },
- { str : "-1", res : -1, endptr_val : '\0' },
- { str : "1a", res : 26, endptr_val : '\0' },
- { str : "-5F7", res : -1527, endptr_val : '\0' },
- { str : "0x1234567", res : 19088743, endptr_val : '\0' },
- { str : "007", res : 7, endptr_val : '\0' },
- { str : "0X00ABCD", res : 43981, endptr_val : '\0' },
- { str : " +AbC", res : 2748, endptr_val : '\0' },
- { str : " -0xAbC", res : -2748, endptr_val : '\0' },
- { str : " -0xxx", res : 0, endptr_val : 'x' },
- { str : "\n\t\r\v -56", res : -86, endptr_val : '\0' },
- { str : "123xyz", res : 291, endptr_val : 'x' },
- { str : " -123defghi", res : -1195503, endptr_val : 'g' },
-
- // Whitespace after the +/- is not allowed; conversion fails.
- { str : "+ 1", res : 0, endptr_val : '+' },
- { str : "-\n0x1", res : 0, endptr_val : '-' },
- };
-
- // Nb: We test the results against strtoll() as well.
- int i;
- for (i = 0; i < (sizeof(a) / sizeof(StrtollInputs)); i++) {
- Char* endptr1;
- char* endptr2;
- Long res1 = VG_(strtoll16)(a[i].str, &endptr1);
- long long res2 = strtoll (a[i].str, &endptr2, 16);
- //printf(" res1 = %lld, *endptr1 = '%c'\n", res1, *endptr1);
- //printf(" res2 = %lld, *endptr2 = '%c'\n", res2, *endptr2);
- assert(a[i].res == res1 && a[i].endptr_val == *endptr1);
- assert(res2 == res1 && *endptr2 == *endptr1);
- }
- }
+ // VG_(strtod)()
+ // XXX: todo
}
int main(void)
|