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
(14) |
|
2
|
3
(6) |
4
(9) |
5
(23) |
6
(6) |
7
(10) |
8
(2) |
|
9
(1) |
10
(5) |
11
(2) |
12
(5) |
13
(2) |
14
(2) |
15
(4) |
|
16
(3) |
17
(22) |
18
(21) |
19
(15) |
20
(24) |
21
(5) |
22
(5) |
|
23
(14) |
24
(2) |
25
(2) |
26
(1) |
27
|
28
|
29
(1) |
|
30
|
31
|
|
|
|
|
|
|
From: <sv...@va...> - 2016-10-25 20:46:09
|
Author: philippe
Date: Tue Oct 25 21:46:00 2016
New Revision: 16106
Log:
Add some more comments in pub_tool_debuginfo.h about memory persistence/ownership
and have m_debuginfo.c referencing these comments.
Modified:
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/include/pub_tool_debuginfo.h
Modified: trunk/coregrind/m_debuginfo/debuginfo.c
==============================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c (original)
+++ trunk/coregrind/m_debuginfo/debuginfo.c Tue Oct 25 21:46:00 2016
@@ -1736,13 +1736,15 @@
call has come from VG_(get_fnname_raw)(). findText
indicates whether we're looking for a text symbol or a data symbol
-- caller must choose one kind or the other.
- Note: the string returned in *BUF is persistent as long as
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h
+ get_sym_name and the fact it calls the demangler is the main reason
+ for non persistence of the information returned by m_debuginfo.c
+ functions : the string returned in *BUF is persistent as long as
(1) the DebugInfo it belongs to is not discarded
- (2) the segment containing the address is not merged with another segment
- (3) the demangler is not invoked again
- In other words: if in doubt, save it away.
+ (2) the demangler is not invoked again
Also, the returned string is owned by "somebody else". Callers must
- not free it or modify it. */
+ not free it or modify it.*/
static
Bool get_sym_name ( Bool do_cxx_demangling, Bool do_z_demangling,
Bool do_below_main_renaming,
@@ -1822,8 +1824,8 @@
/* This is available to tools... always demangle C++ names,
match anywhere in function, but don't show offsets.
- NOTE: See important comment about the persistence and memory ownership
- of the return string at function get_sym_name */
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h */
Bool VG_(get_fnname) ( Addr a, const HChar** buf )
{
return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
@@ -1837,8 +1839,8 @@
/* This is available to tools... always demangle C++ names,
match anywhere in function, and show offset if nonzero.
- NOTE: See important comment about the persistence and memory ownership
- of the return string at function get_sym_name */
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h */
Bool VG_(get_fnname_w_offset) ( Addr a, const HChar** buf )
{
return get_sym_name ( /*C++-demangle*/True, /*Z-demangle*/True,
@@ -1853,8 +1855,8 @@
/* This is available to tools... always demangle C++ names,
only succeed if 'a' matches first instruction of function,
and don't show offsets.
- NOTE: See important comment about the persistence and memory ownership
- of the return string at function get_sym_name */
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h */
Bool VG_(get_fnname_if_entry) ( Addr a, const HChar** buf )
{
const HChar *tmp;
@@ -1875,8 +1877,8 @@
/* This is only available to core... don't C++-demangle, don't Z-demangle,
don't rename below-main, match anywhere in function, and don't show
offsets.
- NOTE: See important comment about the persistence and memory ownership
- of the return string at function get_sym_name */
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h */
Bool VG_(get_fnname_raw) ( Addr a, const HChar** buf )
{
return get_sym_name ( /*C++-demangle*/False, /*Z-demangle*/False,
@@ -1891,8 +1893,8 @@
/* This is only available to core... don't demangle C++ names, but do
do Z-demangling and below-main-renaming, match anywhere in function, and
don't show offsets.
- NOTE: See important comment about the persistence and memory ownership
- of the return string at function get_sym_name */
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h */
Bool VG_(get_fnname_no_cxx_demangle) ( Addr a, const HChar** buf,
const InlIPCursor* iipc )
{
@@ -1974,8 +1976,8 @@
/* Looks up data_addr in the collection of data symbols, and if found
puts a pointer to its name into dname. The name is zero terminated.
Also data_addr's offset from the symbol start is put into *offset.
- NOTE: See important comment about the persistence and memory ownership
- of the return string at function get_sym_name */
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership
+ in pub_tool_debuginfo.h */
Bool VG_(get_datasym_and_offset)( Addr data_addr,
/*OUT*/const HChar** dname,
/*OUT*/PtrdiffT* offset )
@@ -1995,7 +1997,7 @@
(1) the DebugInfo it belongs to is not discarded
(2) the segment containing the address is not merged with another segment
*/
-Bool VG_(get_objname) ( Addr a, const HChar** buf )
+Bool VG_(get_objname) ( Addr a, const HChar** objname )
{
DebugInfo* di;
const NSegment *seg;
@@ -2008,7 +2010,7 @@
&& di->text_size > 0
&& di->text_avma <= a
&& a < di->text_avma + di->text_size) {
- *buf = di->fsm.filename;
+ *objname = di->fsm.filename;
return True;
}
}
@@ -2019,7 +2021,7 @@
when running programs under wine. */
if ( (seg = VG_(am_find_nsegment)(a)) != NULL
&& (filename = VG_(am_get_filename)(seg)) != NULL ) {
- *buf = filename;
+ *objname = filename;
return True;
}
return False;
@@ -4349,7 +4351,7 @@
in *name. The returned name, if any, should be saved away, if there is
a chance that a debug-info will be discarded and the name is being
used later on. */
-VgSectKind VG_(DebugInfo_sect_kind)( /*OUT*/const HChar** name, Addr a)
+VgSectKind VG_(DebugInfo_sect_kind)( /*OUT*/const HChar** objname, Addr a)
{
DebugInfo* di;
VgSectKind res = Vg_SectUnknown;
@@ -4426,11 +4428,11 @@
vg_assert( (di == NULL && res == Vg_SectUnknown)
|| (di != NULL && res != Vg_SectUnknown) );
- if (name) {
+ if (objname) {
if (di && di->fsm.filename) {
- *name = di->fsm.filename;
+ *objname = di->fsm.filename;
} else {
- *name = "???";
+ *objname = "???";
}
}
Modified: trunk/include/pub_tool_debuginfo.h
==============================================================================
--- trunk/include/pub_tool_debuginfo.h (original)
+++ trunk/include/pub_tool_debuginfo.h Tue Oct 25 21:46:00 2016
@@ -38,12 +38,44 @@
/*=== Obtaining debug information ===*/
/*====================================================================*/
+/* IMPORTANT COMMENT about memory persistence and ownership.
+
+ Many functions below are returning a string in a HChar** argument.
+ This memory must not be freed by the caller : it belongs to the debuginfo
+ module. The returned string is *not* guaranteed to be persistent.
+ The exact persistence depends on the kind of information returned,
+ and of the internal implementation of the debuginfo module.
+ In other words: use the memory directly after the call, and if in doubt,
+ save it away.
+
+ In general, all returned strings will be invalidated when the
+ DebugInfo they correspond to is discarded. This is the case for
+ the filename, dirname, fnname and objname.
+ An objname might also be invalidated by changes to the address
+ space manager segments, e.g. if a segment is merged with another
+ segment.
+
+ Retrieving a fnname might imply a call to the c++ demangler.
+ A returned fnname is invalidated if any other call to the demangler
+ is done. In particular, this means that the memory returned by one of
+ the VG_(get_fnname...) functions is invalidated by :
+ * another call to any of the functions VG_(get_fnname...).
+ * any other call that will directly or indirectly invoke the
+ c++ demangler. Such an indirect call to the demangler can a.o. be
+ done by calls to pub_tool_errormgr.h functions.
+ So, among others, the following is WRONG:
+ VG_(get_fnname)(a1, &fnname1);
+ VG_(get_fnname)(a2, &fnname2);
+ ... it is WRONG to use fnname1 here ....
+*/
+
/* Get the file/function/line number of the instruction at address
'a'. For these four, if debug info for the address is found, it
copies the info into the buffer/UInt and returns True. If not, it
returns False. VG_(get_fnname) always
demangles C++ function names. VG_(get_fnname_w_offset) is the
- same, except it appends "+N" to symbol names to indicate offsets. */
+ same, except it appends "+N" to symbol names to indicate offsets.
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership. */
extern Bool VG_(get_filename) ( Addr a, const HChar** filename );
extern Bool VG_(get_fnname) ( Addr a, const HChar** fnname );
extern Bool VG_(get_linenum) ( Addr a, UInt* linenum );
@@ -58,9 +90,7 @@
it is available; if not available, '\0' is written to the first
byte.
- The character strings returned in *filename and *dirname are not
- persistent. They will be freed when the DebugInfo they belong to
- is discarded.
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership.
Returned value indicates whether any filename/line info could be
found. */
@@ -76,7 +106,8 @@
instruction in a function. Use this to instrument the start of
a particular function. Nb: if an executable/shared object is stripped
of its symbols, this function will not be able to recognise function
- entry points within it. */
+ entry points within it.
+ NOTE: See IMPORTANT COMMENT above about persistence and ownership. */
extern Bool VG_(get_fnname_if_entry) ( Addr a, const HChar** fnname );
typedef
@@ -120,7 +151,9 @@
);
/* Succeeds if the address is within a shared object or the main executable.
- It doesn't matter if debug info is present or not. */
+ It first searches if Addr a belongs to the text segment of debug info.
+ If not found, it asks the address space manager whether it
+ knows the name of the file associated with this mapping. */
extern Bool VG_(get_objname) ( Addr a, const HChar** objname );
@@ -261,10 +294,10 @@
const HChar* VG_(pp_SectKind)( VgSectKind kind );
/* Given an address 'a', make a guess of which section of which object
- it comes from. If name is non-NULL, then the object's name is put
- into *name. The returned name is persistent as long as the debuginfo
- it belongs to isn't discarded. */
-VgSectKind VG_(DebugInfo_sect_kind)( /*OUT*/const HChar** name, Addr a);
+ it comes from. If objname is non-NULL, then the object's name is put
+ into *objname. This only looks in debug info, it does not examine
+ the address space manager mapped files. */
+VgSectKind VG_(DebugInfo_sect_kind)( /*OUT*/const HChar** objname, Addr a);
#endif // __PUB_TOOL_DEBUGINFO_H
|
|
From: <sv...@va...> - 2016-10-25 04:55:45
|
Author: iraisr
Date: Tue Oct 25 05:55:35 2016
New Revision: 16105
Log:
Solaris: Add wrapper for fcntl(F_DUPFD_CLOEXEC)
n-i-bz
Modified:
trunk/coregrind/m_syswrap/syswrap-solaris.c
trunk/include/vki/vki-solaris.h
trunk/memcheck/tests/solaris/scalar.c
Modified: trunk/coregrind/m_syswrap/syswrap-solaris.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-solaris.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-solaris.c Tue Oct 25 05:55:35 2016
@@ -3938,6 +3938,7 @@
/* These ones use ARG3 as "arg". */
case VKI_F_DUPFD:
+ case VKI_F_DUPFD_CLOEXEC:
case VKI_F_SETFD:
case VKI_F_SETFL:
case VKI_F_DUP2FD:
@@ -4032,8 +4033,15 @@
if (!ML_(fd_allowed)(RES, "fcntl(F_DUPFD)", tid, True)) {
VG_(close)(RES);
SET_STATUS_Failure(VKI_EMFILE);
- }
- else if (VG_(clo_track_fds))
+ } else if (VG_(clo_track_fds))
+ ML_(record_fd_open_named)(tid, RES);
+ break;
+
+ case VKI_F_DUPFD_CLOEXEC:
+ if (!ML_(fd_allowed)(RES, "fcntl(F_DUPFD_CLOEXEC)", tid, True)) {
+ VG_(close)(RES);
+ SET_STATUS_Failure(VKI_EMFILE);
+ } else if (VG_(clo_track_fds))
ML_(record_fd_open_named)(tid, RES);
break;
@@ -4041,8 +4049,7 @@
if (!ML_(fd_allowed)(RES, "fcntl(F_DUP2FD)", tid, True)) {
VG_(close)(RES);
SET_STATUS_Failure(VKI_EMFILE);
- }
- else if (VG_(clo_track_fds))
+ } else if (VG_(clo_track_fds))
ML_(record_fd_open_named)(tid, RES);
break;
Modified: trunk/include/vki/vki-solaris.h
==============================================================================
--- trunk/include/vki/vki-solaris.h (original)
+++ trunk/include/vki/vki-solaris.h Tue Oct 25 05:55:35 2016
@@ -500,6 +500,7 @@
#define VKI_O_LARGEFILE O_LARGEFILE
#define VKI_F_DUPFD F_DUPFD
+#define VKI_F_DUPFD_CLOEXEC F_DUPFD_CLOEXEC
#define VKI_F_GETFD F_GETFD
#define VKI_F_SETFD F_SETFD
#define VKI_F_GETFL F_GETFL
Modified: trunk/memcheck/tests/solaris/scalar.c
==============================================================================
--- trunk/memcheck/tests/solaris/scalar.c (original)
+++ trunk/memcheck/tests/solaris/scalar.c Tue Oct 25 05:55:35 2016
@@ -308,6 +308,13 @@
__attribute__((noinline))
static void sys_fcntl3(void)
{
+ GO(SYS_fcntl, "(DUPFD_CLOEXEC) 3s 0m");
+ SY(SYS_fcntl, x0 - 1, x0 + F_DUPFD_CLOEXEC, x0); FAILx(EBADF);
+}
+
+__attribute__((noinline))
+static void sys_fcntl4(void)
+{
GO(SYS_fcntl, "(GETLK) 3s 5m");
SY(SYS_fcntl, x0 - 1, x0 + F_GETLK, x0); FAILx(EBADF);
}
@@ -1755,6 +1762,7 @@
sys_fcntl();
sys_fcntl2();
sys_fcntl3();
+ sys_fcntl4();
/* SYS_ulimit 63 */
/* XXX Missing wrapper. */
|