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
(3) |
2
(2) |
3
(1) |
|
4
(1) |
5
|
6
(4) |
7
(3) |
8
|
9
(1) |
10
(1) |
|
11
(1) |
12
(9) |
13
|
14
(1) |
15
(6) |
16
(4) |
17
(2) |
|
18
|
19
(3) |
20
|
21
(1) |
22
(2) |
23
(2) |
24
(2) |
|
25
|
26
(1) |
27
(1) |
28
(1) |
29
(2) |
30
|
31
|
|
From: <sv...@va...> - 2015-10-29 07:29:11
|
Author: iraisr
Date: Thu Oct 29 07:28:58 2015
New Revision: 15719
Log:
ELF debug info reader was confused with multiple .rodata sections on Solaris
The ELF debug info reader on Solaris now performs a quick pre-scan of section
headers for .rodata sections. If there are multiple .rodata sections
present then symbols from .symtab are scanned which section they point to.
The "true" .rodata section is thus determined.
Fixes BZ#353802.
Modified:
trunk/coregrind/m_debuginfo/readelf.c
Modified: trunk/coregrind/m_debuginfo/readelf.c
==============================================================================
--- trunk/coregrind/m_debuginfo/readelf.c (original)
+++ trunk/coregrind/m_debuginfo/readelf.c Thu Oct 29 07:28:58 2015
@@ -1506,6 +1506,11 @@
XArray* /* of RangeAndBias */ svma_ranges = NULL;
+# if defined(VGO_solaris)
+ Word *rodata_sects = NULL;
+ Word rodata_shndx = -1;
+# endif /* VGO_solaris */
+
vg_assert(di);
vg_assert(di->fsm.have_rx_map == True);
vg_assert(di->fsm.have_rw_map == True);
@@ -1836,13 +1841,88 @@
}
/* TOPLEVEL */
+# if defined(VGO_solaris)
+ /* Quick pre-scan of sections headers. Check if multiple .rodata sections
+ are present. See https://bugs.kde.org/show_bug.cgi?id=353802 */
+ rodata_sects = ML_(dinfo_zalloc)("di.redi_name.1",
+ shdr_mnent * sizeof(Word));
+ Word rodata_nsects = 0;
+ Word symtab_shndx = -1;
+ DiOffT symtab_sz = DiOffT_INVALID;
+ DiOffT symtab_ioff = DiOffT_INVALID;
+ for (i = 0; i < shdr_mnent; i++) {
+ ElfXX_Shdr a_shdr;
+ ML_(img_get)(&a_shdr, mimg,
+ INDEX_BIS(shdr_mioff, i, shdr_ment_szB), sizeof(a_shdr));
+ DiOffT name_mioff = shdr_strtab_mioff + a_shdr.sh_name;
+ if (ML_(img_strcmp_c)(mimg, name_mioff, ".rodata") == 0) {
+ rodata_sects[i] = True;
+ rodata_nsects += 1;
+ } else if (ML_(img_strcmp_c)(mimg, name_mioff, ".symtab") == 0) {
+ symtab_shndx = i;
+ symtab_sz = a_shdr.sh_size;
+ symtab_ioff = a_shdr.sh_offset;
+ }
+ }
+
+ if ((rodata_nsects > 1) && (symtab_shndx != -1)) {
+ TRACE_SYMTAB("Multiple (%ld) .rodata sections present.\n", rodata_nsects);
+
+ /* Multiple .rodata sections present. Which one the symbols point to? */
+ for (i = 1; i < (Word) (symtab_sz/sizeof(ElfXX_Sym)); i++) {
+ ElfXX_Sym sym;
+ ML_(img_get)(&sym, mimg,
+ symtab_ioff + i * sizeof(ElfXX_Sym), sizeof(sym));
+ /* Consider only object symbols with size > 0. */
+ if ((sym.st_size > 0) && (ELFXX_ST_TYPE(sym.st_info) == STT_OBJECT)) {
+ HChar buf[100]; // large enough
+ if (sym.st_shndx >= shdr_mnent) {
+ VG_(snprintf)(buf, sizeof(buf), "Symbol %ld points to a "
+ "non-existent section %d.\n", i, sym.st_shndx);
+ ML_(symerr)(di, True, buf);
+ goto out;
+ }
+ if (rodata_sects[sym.st_shndx] == True) {
+ if (rodata_shndx == -1)
+ rodata_shndx = sym.st_shndx;
+
+ if (rodata_shndx != sym.st_shndx) {
+ VG_(snprintf)(buf, sizeof(buf), "Object symbols point to "
+ "multiple .rodata sections (%lu and %d). "
+ "Giving up.\n", rodata_shndx, sym.st_shndx);
+ ML_(symerr)(di, True, buf);
+ goto out;
+ }
+ }
+ }
+ }
+ }
+
+ if (rodata_shndx == -1) {
+ if (rodata_nsects >= 1) {
+ for (i = 0; i < shdr_mnent; i++) {
+ if (rodata_sects[i] == True)
+ rodata_shndx = i;
+ }
+ }
+
+ if (rodata_nsects > 1)
+ TRACE_SYMTAB("Symbols do not point to any .rodata section. Section "
+ "#%ld was chosen.\n", rodata_shndx);
+ } else {
+ TRACE_SYMTAB("Symbols point only to .rodata section #%ld. Good.\n",
+ rodata_shndx);
+ }
+# endif /* VGO_solaris */
+
+ /* TOPLEVEL */
/* Iterate over section headers */
for (i = 0; i < shdr_mnent; i++) {
ElfXX_Shdr a_shdr;
ML_(img_get)(&a_shdr, mimg,
INDEX_BIS(shdr_mioff, i, shdr_ment_szB), sizeof(a_shdr));
DiOffT name_mioff = shdr_strtab_mioff + a_shdr.sh_name;
- HChar* name = ML_(img_strdup)(mimg, "di.redi_name.1", name_mioff);
+ HChar* name = ML_(img_strdup)(mimg, "di.redi_name.2", name_mioff);
Addr svma = a_shdr.sh_addr;
OffT foff = a_shdr.sh_offset;
UWord size = a_shdr.sh_size; /* Do not change this to be signed. */
@@ -1867,10 +1947,10 @@
}
}
- TRACE_SYMTAB(" [sec %2ld] %s %s al%2u foff %6ld .. %6lu "
+ TRACE_SYMTAB(" [sec %2ld] %s %s al%4u foff %6ld .. %6lu "
" svma %p name \"%s\"\n",
i, inrx ? "rx" : " ", inrw ? "rw" : " ", alyn,
- foff, foff+size-1, (void*)svma, name);
+ foff, (size == 0) ? foff : foff+size-1, (void *) svma, name);
/* Check for sane-sized segments. SHT_NOBITS sections have zero
size in the file and their offsets are just conceptual. */
@@ -1977,7 +2057,11 @@
/* Accept .rodata where mapped as rx (data), even if zero-sized */
if (0 == VG_(strcmp)(name, ".rodata")) {
- if (inrx && !di->rodata_present) {
+ if (inrx && !di->rodata_present
+# if defined(VGO_solaris)
+ && i == rodata_shndx
+# endif
+ ) {
di->rodata_present = True;
di->rodata_svma = svma;
di->rodata_avma = svma + inrx->bias;
@@ -1994,6 +2078,11 @@
di->rodata_avma + di->rodata_size - 1);
TRACE_SYMTAB("acquiring .rodata bias = %#lx\n",
(UWord)di->rodata_bias);
+# if defined(VGO_solaris)
+ } else if (i != rodata_shndx) {
+ /* Skip this section. It is of no use to us.
+ See https://bugs.kde.org/show_bug.cgi?id=353802 */
+# endif
} else {
BAD(".rodata");
}
@@ -3030,6 +3119,10 @@
if (svma_ranges) VG_(deleteXA)(svma_ranges);
+# if defined(VGO_solaris)
+ if (rodata_sects != NULL) ML_(dinfo_free)(rodata_sects);
+# endif
+
return res;
} /* out: */
|
|
From: William G. <app...@li...> - 2015-10-29 01:10:57
|
Thank you for your response. If I would like to use an STL container to store data, would it be prudent to link with a custom library that replaces C library functions with VG(functions)? ________________________________________ From: Philippe Waroquiers <phi...@sk...> Sent: Wednesday, October 28, 2015 5:37 PM To: William Good Cc: val...@li... Subject: Re: [Valgrind-developers] Developing a tool using C++STL On Tue, 2015-10-27 at 16:54 +0000, William Good wrote: > Hello, > I would like to use some C++ containers in my tool. I have attempted > to modify my tool's Makefile.am by adding AM_CXXFLAGS = -std=gnu++11 > at the top and changing $(LINK) to $(CXXLINK). However, because of > the -nodefaultlibs switch I have to manually add libraries to be > linked. I receive a multiple definition error: > > > /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/libc.a(abort.o): In function `abort': > (.text+0x0): multiple definition of `abort' > ../coregrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_main.o):/home/will/Downloads/vg1/coregrind/m_main.c:2861: first defined here > > > There is a conflict because of valgrind's redefinition of standard > library functions. Is it possible or are the examples of using C++ in > a valgrind tool. Using libraries to develop tool is not allowed. Even using the libc syscalls is not allowed, so valgrind has its own layer to interface to the kernel. Valgrind also has a re-implementation of all needed 'library functions' e.g. strcmp is not called in valgrind tools, instead, you need to call the re-implementation that has the name VG_(strcmp). As far as I know, the reason is that using libraries in a tool might give that some library functions would be re-entered (called by the tool) while a function of the library might be "busy" executing by the client. This can then lead to deadlocks or whatever similar problems (e.g. imagine the library has a lock. If the tool calls a function that needs to take the same lock, this will give a deadlock). In summary, you cannot use any library in Valgrind tools. I think you should be able to use C++, as long as your C++ code does not make any library calls/does not have any dependency to any c++ runtime/library/... So, using c++ without any runtime/library might be difficult to achieve. Philippe NB: I replied to the valgrind developer post. No need to ask such questions on the user list, the valdev list is the good one for such subjects. |