You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(58) |
Apr
(261) |
May
(169) |
Jun
(214) |
Jul
(201) |
Aug
(219) |
Sep
(198) |
Oct
(203) |
Nov
(241) |
Dec
(94) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(137) |
Feb
(149) |
Mar
(150) |
Apr
(193) |
May
(95) |
Jun
(173) |
Jul
(137) |
Aug
(236) |
Sep
(157) |
Oct
(150) |
Nov
(136) |
Dec
(90) |
| 2005 |
Jan
(139) |
Feb
(130) |
Mar
(274) |
Apr
(138) |
May
(184) |
Jun
(152) |
Jul
(261) |
Aug
(409) |
Sep
(239) |
Oct
(241) |
Nov
(260) |
Dec
(137) |
| 2006 |
Jan
(191) |
Feb
(142) |
Mar
(169) |
Apr
(75) |
May
(141) |
Jun
(169) |
Jul
(131) |
Aug
(141) |
Sep
(192) |
Oct
(176) |
Nov
(142) |
Dec
(95) |
| 2007 |
Jan
(98) |
Feb
(120) |
Mar
(93) |
Apr
(96) |
May
(95) |
Jun
(65) |
Jul
(62) |
Aug
(56) |
Sep
(53) |
Oct
(95) |
Nov
(106) |
Dec
(87) |
| 2008 |
Jan
(58) |
Feb
(149) |
Mar
(175) |
Apr
(110) |
May
(106) |
Jun
(72) |
Jul
(55) |
Aug
(89) |
Sep
(26) |
Oct
(96) |
Nov
(83) |
Dec
(93) |
| 2009 |
Jan
(97) |
Feb
(106) |
Mar
(74) |
Apr
(64) |
May
(115) |
Jun
(83) |
Jul
(137) |
Aug
(103) |
Sep
(56) |
Oct
(59) |
Nov
(61) |
Dec
(37) |
| 2010 |
Jan
(94) |
Feb
(71) |
Mar
(53) |
Apr
(105) |
May
(79) |
Jun
(111) |
Jul
(110) |
Aug
(81) |
Sep
(50) |
Oct
(82) |
Nov
(49) |
Dec
(21) |
| 2011 |
Jan
(87) |
Feb
(105) |
Mar
(108) |
Apr
(99) |
May
(91) |
Jun
(94) |
Jul
(114) |
Aug
(77) |
Sep
(58) |
Oct
(58) |
Nov
(131) |
Dec
(62) |
| 2012 |
Jan
(76) |
Feb
(93) |
Mar
(68) |
Apr
(95) |
May
(62) |
Jun
(109) |
Jul
(90) |
Aug
(87) |
Sep
(49) |
Oct
(54) |
Nov
(66) |
Dec
(84) |
| 2013 |
Jan
(67) |
Feb
(52) |
Mar
(93) |
Apr
(65) |
May
(33) |
Jun
(34) |
Jul
(52) |
Aug
(42) |
Sep
(52) |
Oct
(48) |
Nov
(66) |
Dec
(14) |
| 2014 |
Jan
(66) |
Feb
(51) |
Mar
(34) |
Apr
(47) |
May
(58) |
Jun
(27) |
Jul
(52) |
Aug
(41) |
Sep
(78) |
Oct
(30) |
Nov
(28) |
Dec
(26) |
| 2015 |
Jan
(41) |
Feb
(42) |
Mar
(20) |
Apr
(73) |
May
(31) |
Jun
(48) |
Jul
(23) |
Aug
(55) |
Sep
(36) |
Oct
(47) |
Nov
(48) |
Dec
(41) |
| 2016 |
Jan
(32) |
Feb
(34) |
Mar
(33) |
Apr
(22) |
May
(14) |
Jun
(31) |
Jul
(29) |
Aug
(41) |
Sep
(17) |
Oct
(27) |
Nov
(38) |
Dec
(28) |
| 2017 |
Jan
(28) |
Feb
(30) |
Mar
(16) |
Apr
(9) |
May
(27) |
Jun
(57) |
Jul
(28) |
Aug
(43) |
Sep
(31) |
Oct
(20) |
Nov
(24) |
Dec
(18) |
| 2018 |
Jan
(34) |
Feb
(50) |
Mar
(18) |
Apr
(26) |
May
(13) |
Jun
(31) |
Jul
(13) |
Aug
(11) |
Sep
(15) |
Oct
(12) |
Nov
(18) |
Dec
(13) |
| 2019 |
Jan
(12) |
Feb
(29) |
Mar
(51) |
Apr
(22) |
May
(13) |
Jun
(20) |
Jul
(13) |
Aug
(12) |
Sep
(21) |
Oct
(6) |
Nov
(9) |
Dec
(5) |
| 2020 |
Jan
(13) |
Feb
(5) |
Mar
(25) |
Apr
(4) |
May
(40) |
Jun
(27) |
Jul
(5) |
Aug
(17) |
Sep
(21) |
Oct
(1) |
Nov
(5) |
Dec
(15) |
| 2021 |
Jan
(28) |
Feb
(6) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(5) |
Aug
(5) |
Sep
(11) |
Oct
(9) |
Nov
(10) |
Dec
(12) |
| 2022 |
Jan
(7) |
Feb
(13) |
Mar
(8) |
Apr
(7) |
May
(12) |
Jun
(27) |
Jul
(14) |
Aug
(27) |
Sep
(27) |
Oct
(17) |
Nov
(17) |
Dec
|
| 2023 |
Jan
(10) |
Feb
(18) |
Mar
(9) |
Apr
(26) |
May
|
Jun
(13) |
Jul
(18) |
Aug
(5) |
Sep
(12) |
Oct
(16) |
Nov
(1) |
Dec
|
| 2024 |
Jan
(4) |
Feb
(3) |
Mar
(6) |
Apr
(17) |
May
(2) |
Jun
(33) |
Jul
(13) |
Aug
(1) |
Sep
(6) |
Oct
(8) |
Nov
(6) |
Dec
(15) |
| 2025 |
Jan
(5) |
Feb
(11) |
Mar
(8) |
Apr
(20) |
May
(1) |
Jun
|
Jul
|
Aug
(9) |
Sep
(1) |
Oct
(7) |
Nov
(1) |
Dec
|
|
From: John R. <jr...@bi...> - 2021-11-10 04:11:12
|
On 11/9/21 14:16, Kyryl Melekhin wrote: > Hello, > > I am almost certain to have found a bug in valgrind. > The false positive error appears only when compiled with > tcc compiler. The platform is x86_64 linux, musl. > > I can reproduce it in my regex engine and I have created > the following branch for you to check it out: > https://github.com/kyx0r/pikevm/tree/valgrind_bug > [[snip]] If the problem is compiler-dependent, and if pikevm is as small as advertised, then the best thing for *you* to do is to produce two complete runnable executable programs, which are "the same" except that one has the suspected bug (thus is compiled with tcc for x86_64, and linked with musl to run under Linux), and the other does not (the same source compiled with some other compiler [specify and include its version], and linked with musl to run under Linux.) Provide a URL to each executable file. Almost nobody will go to the trouble of re-creating your unspecified software build environment (which version of tcc and where to get it, which version of musl and where to get it, etc.) just to investigate the alleged bug. Your recipe [snipped above] does not matter. If *you* cannot be bothered to execute the recipe and provide URL to the results, then it is extremely likely that no one else will bother, either. Various hosting services provide no-cost or low-cost download service, and even GitHub allows attachments and other ways to provide access to non-humongous executable files. Use one. |
|
From: Kyryl M. <k.m...@gm...> - 2021-11-10 03:16:45
|
Hello, I am almost certain to have found a bug in valgrind. The false positive error appears only when compiled with tcc compiler. The platform is x86_64 linux, musl. I can reproduce it in my regex engine and I have created the following branch for you to check it out: https://github.com/kyx0r/pikevm/tree/valgrind_bug Diff last commit on that branch, the valgrind_bug.sh runs compiles pike.c with tcc and runs it to show the false report. I have added a comment where the so called "uninitialized value" comes from. I am using the latest git commit of tcc and valgrind. This error does not happen on any other compiler, any optimization level. Code generated by tcc does not seem to produce any erroneous results. Not a single defect, segfault or anything has ever been found. I am also confident that code like this is permitted by the C standard as its simple pointer arithmetic. *(p - 1) The test cases in tesh.sh, specifically those around cases 130-150 certainly will fail if there actually is an uninitialized variable. If somehow the result of this branch: if (*nlist[nlistidx-1].pc == MATCH) break; gets tampered with the test case fails %100. What i've done to test, I have put the test suite into an infinite loop and it keeps running without ever failing, so that means there is never uninitialized variable there, and it's also obvious if you read the code, why it will never be that. It has been running for a few hours now. Usually chances of seeing the effects take a few runs, here is not the case. I know this is not the dev mailing list, please forward it to them. This is a very interesting case to investigate, as this questions the broader validity of valgrind's uninitialized value tracking. |
|
From: Paul F. <pj...@wa...> - 2021-10-21 21:02:50
|
On 21/10/2021 20:45, Florian Weimer wrote: > * Paul Floyd: > >> Unless someone else has an Idea this is going to need some debugging >> inside Valgrind. > It's probably the glibc implementation that is incorrectly executed by > valgrind. “g++ -fno-builtin” reproduces the issue with the original > sources. Yes, this is what is happening. Stepping through libc cbrtl with debuginfo, outside of Valgrind the return is where the arrow is, presumably fpclassify saying that it is FP_ZERO. xe is an int, can't imagine comparing it to zero is going to be a problem. 54 if (xe == 0 && fpclassify (x) <= FP_ZERO) │ >55 return x + x; The enum values returned by fpclassify are FP_NAN 0, FP_INFINITE 1, FP_ZERO 2. Inside Valgrind this test is false, and the (wrong) value that is calculated corresponds to the expressions and constants in the code. # define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, \ FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x) From what I see this builtin performs /* fpclassify(x) -> isnan(x) ? FP_NAN : (fabs(x) == Inf ? FP_INFINITE : (fabs(x) >= DBL_MIN ? FP_NORMAL : (x == 0 ? FP_ZERO : FP_SUBNORMAL))). */ For the first test, it looks like there is a 'fucomi'.That will set the parity flag if the input is NaN, but I only see ZF set. The next test is another 'fucomi' comparing to the largest long double followed by a 'ja', testing for Inf. The result is just CF set - less than. The third test is a 'fcompi' with ldbl_min. This sets ZF, and is followed by a 'jae'. That's wrong. That would mean 0.0 == ldbl_min. If internally we are working with double precision that it's to be expected that ldbl_min underflows to 0.0 and the comparison is true. It's a shame the libc test is done in this order. I don't see any easy fix for this. A+ Paul |
|
From: Florian W. <fw...@de...> - 2021-10-21 19:03:25
|
* Paul Floyd: > Unless someone else has an Idea this is going to need some debugging > inside Valgrind. It's probably the glibc implementation that is incorrectly executed by valgrind. “g++ -fno-builtin” reproduces the issue with the original sources. |
|
From: Paul F. <pj...@wa...> - 2021-10-20 19:41:07
|
On 20/10/2021 20:13, Paul Floyd wrote:
> On 10/20/21 16:16, Paul FLOYD wrote:
>
>>> Message du 20/10/21 17:14
>>>
>>> De : "Vladislav Yaglamunov"
>>>
>>> A : val...@li...
>>>
>>> Copie à :
>>>
>>> Objet : [Valgrind-users] Cubic root of zero gives wrong result with
>>> clang 64-bit
>>>
>>> I am using Valgrind 3.17.0 and noticed a strange behavior while
>>> running a code compiled with clang:
>>>
>> #include
>>
>>> int main() {
>>>
>>> long double x = std::cbrtl(0.0L);
>>>
>>> printf("%Lf", x);
>>>
>>> return 0;
>>>
>>> }
>>>
>> I just did a test with g++. I had to modify the code a bit to prevent
>> the compiler replacing the cbrtl() call with just a zero:
>>
>> #include <cmath>
>>
>> #include <
>>
>> int main() {
>>
>> volatile long double arg{0.0L};
>>
>> long double x = std::cbrtl(arg);
>>
>> printf("%Lf", x);
>>
>> return 0;
>>
>> }
>>
>> This seems to work OK, both default and -m32.
>>
>> The asm for that is
>>
>> 00000000004011a5 :
>>
>> 4011a5: 55 push %rbp
>>
>> 4011a6: 48 89 e5 mov %rsp,%rbp
>>
>> 4011a9: 48 83 ec 20 sub $0x20,%rsp
>>
>> 4011ad: d9 ee fldz
>>
>> 4011af: db 7d e0 fstpt -0x20(%rbp)
>>
>> 4011b2: db 6d e0 fldt -0x20(%rbp)
>>
>> 4011b5: 48 8d 64 24 f0 lea -0x10(%rsp),%rsp
>>
>> 4011ba: db 3c 24 fstpt (%rsp)
>>
>> 4011bd: e8 8e fe ff ff callq 401050
>>
>> 4011c2: 48 83 c4 10 add $0x10,%rsp
>>
>> 4011c6: db 7d f0 fstpt -0x10(%rbp)
>>
>> 4011c9: ff 75 f8 pushq -0x8(%rbp)
>>
>> 4011cc: ff 75 f0 pushq -0x10(%rbp)
>>
>> 4011cf: bf 04 20 40 00 mov $0x402004,%edi
>>
>> 4011d4: b8 00 00 00 00 mov $0x0,%eax
>>
>> 4011d9: e8 62 fe ff ff callq 401040
>>
>> 4011de: 48 83 c4 10 add $0x10,%rsp
>>
>> 4011e2: b8 00 00 00 00 mov $0x0,%eax
>>
>> 4011e7: c9 leaveq
>>
>> 4011e8: c3 retq
>>
> Well, it works with clang++:
>
> FreeBSD clang version 11.0.1 (gi...@gi...:llvm/llvm-project.git
> llvmorg-11.0.
>
> 1-0-g43ff75f2c3fe)
>
> Target: x86_64-unknown-freebsd13.0
>
> I also tried clang++ 8, 9 and 12.
>
> The asm for clang++12 for my modified code is
>
> 0000000000201920 <main>:
>
> 201920: 55 push %rbp
>
> 201921: 48 89 e5 mov %rsp,%rbp
>
> 201924: 48 83 ec 40 sub $0x40,%rsp
>
> 201928: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
>
> 20192f: d9 ee fldz
>
> 201931: db 7d e0 fstpt -0x20(%rbp)
>
> 201934: db 6d e0 fldt -0x20(%rbp)
> 201937: 48 89 e0 mov %rsp,%rax
> 20193a: db 38 fstpt (%rax)
> 20193c: e8 bf 00 00 00 call 201a00 <cbrtl@plt>
> 201941: db 7d d0 fstpt -0x30(%rbp)
> 201944: db 6d d0 fldt -0x30(%rbp)
> 201947: 48 89 e0 mov %rsp,%rax
> 20194a: db 38 fstpt (%rax)
> 20194c: bf c9 05 20 00 mov $0x2005c9,%edi
> 201951: 31 c0 xor %eax,%eax
> 201953: e8 b8 00 00 00 call 201a10 <printf@plt>
> 201958: 31 c0 xor %eax,%eax
> 20195a: 48 83 c4 40 add $0x40,%rsp
> 20195e: 5d pop %rbp
> 20195f: c3 ret
>
> Can you post the asm that you are getting ? I'll see if I can try
> clang on Fedora 34.
>
Third time lucky. Reproduced on Fedora 34 with clang++
clang version 12.0.1 (Fedora 12.0.1-1.fc34)
0000000000401140 <main>:
401140: 55 push %rbp
401141: 48 89 e5 mov %rsp,%rbp
401144: 48 83 ec 40 sub $0x40,%rsp
401148: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
40114f: d9 ee fldz
401151: db 7d e0 fstpt -0x20(%rbp)
401154: db 6d e0 fldt -0x20(%rbp)
401157: 48 89 e0 mov %rsp,%rax
40115a: db 38 fstpt (%rax)
40115c: e8 df fe ff ff callq 401040 <cbrtl@plt>
401161: db 7d d0 fstpt -0x30(%rbp)
401164: db 6d d0 fldt -0x30(%rbp)
401167: 48 89 e0 mov %rsp,%rax
40116a: db 38 fstpt (%rax)
40116c: bf 10 20 40 00 mov $0x402010,%edi
401171: 31 c0 xor %eax,%eax
401173: e8 b8 fe ff ff callq 401030 <printf@plt>
401178: 31 c0 xor %eax,%eax
40117a: 48 83 c4 40 add $0x40,%rsp
40117e: 5d pop %rbp
40117f: c3 retq
That looks very much like what I saw on FreeBSD.
Unless someone else has an Idea this is going to need some debugging
inside Valgrind.
A+
Paul
|
|
From: Paul F. <pj...@wa...> - 2021-10-20 18:13:12
|
On 10/20/21 16:16, Paul FLOYD wrote:
>> Message du 20/10/21 17:14
>> De : "Vladislav Yaglamunov"
>> A : val...@li...
>> Copie à :
>> Objet : [Valgrind-users] Cubic root of zero gives wrong result with clang 64-bit
>>
>> I am using Valgrind 3.17.0 and noticed a strange behavior while running a code compiled with clang:
> #include
>> int main() {
>> long double x = std::cbrtl(0.0L);
>> printf("%Lf", x);
>>
>> return 0;
>> }
> I just did a test with g++. I had to modify the code a bit to prevent the compiler replacing the cbrtl() call with just a zero:
>
> #include <cmath>
> #include <
>
> int main() {
> volatile long double arg{0.0L};
> long double x = std::cbrtl(arg);
> printf("%Lf", x);
>
> return 0;
> }
>
> This seems to work OK, both default and -m32.
>
>
> The asm for that is
>
> 00000000004011a5 :
> 4011a5: 55 push %rbp
> 4011a6: 48 89 e5 mov %rsp,%rbp
> 4011a9: 48 83 ec 20 sub $0x20,%rsp
> 4011ad: d9 ee fldz
> 4011af: db 7d e0 fstpt -0x20(%rbp)
> 4011b2: db 6d e0 fldt -0x20(%rbp)
> 4011b5: 48 8d 64 24 f0 lea -0x10(%rsp),%rsp
> 4011ba: db 3c 24 fstpt (%rsp)
> 4011bd: e8 8e fe ff ff callq 401050
> 4011c2: 48 83 c4 10 add $0x10,%rsp
> 4011c6: db 7d f0 fstpt -0x10(%rbp)
> 4011c9: ff 75 f8 pushq -0x8(%rbp)
> 4011cc: ff 75 f0 pushq -0x10(%rbp)
> 4011cf: bf 04 20 40 00 mov $0x402004,%edi
> 4011d4: b8 00 00 00 00 mov $0x0,%eax
> 4011d9: e8 62 fe ff ff callq 401040
> 4011de: 48 83 c4 10 add $0x10,%rsp
> 4011e2: b8 00 00 00 00 mov $0x0,%eax
> 4011e7: c9 leaveq
> 4011e8: c3 retq
Well, it works with clang++:
FreeBSD clang version 11.0.1 (gi...@gi...:llvm/llvm-project.git
llvmorg-11.0.
1-0-g43ff75f2c3fe)
Target: x86_64-unknown-freebsd13.0
I also tried clang++ 8, 9 and 12.
The asm for clang++12 for my modified code is
0000000000201920 <main>:
201920: 55 push %rbp
201921: 48 89 e5 mov %rsp,%rbp
201924: 48 83 ec 40 sub $0x40,%rsp
201928: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%rbp)
20192f: d9 ee fldz
201931: db 7d e0 fstpt -0x20(%rbp)
201934: db 6d e0 fldt -0x20(%rbp)
201937: 48 89 e0 mov %rsp,%rax
20193a: db 38 fstpt (%rax)
20193c: e8 bf 00 00 00 call 201a00 <cbrtl@plt>
201941: db 7d d0 fstpt -0x30(%rbp)
201944: db 6d d0 fldt -0x30(%rbp)
201947: 48 89 e0 mov %rsp,%rax
20194a: db 38 fstpt (%rax)
20194c: bf c9 05 20 00 mov $0x2005c9,%edi
201951: 31 c0 xor %eax,%eax
201953: e8 b8 00 00 00 call 201a10 <printf@plt>
201958: 31 c0 xor %eax,%eax
20195a: 48 83 c4 40 add $0x40,%rsp
20195e: 5d pop %rbp
20195f: c3 ret
Can you post the asm that you are getting ? I'll see if I can try clang
on Fedora 34.
A+
Paul
|
|
From: Paul F. <pj...@wa...> - 2021-10-20 16:16:41
|
> Message du 20/10/21 17:14
> De : "Vladislav Yaglamunov"
> A : val...@li...
> Copie à :
> Objet : [Valgrind-users] Cubic root of zero gives wrong result with clang 64-bit
>
>Hi,
>I am using Valgrind 3.17.0 and noticed a strange behavior while running a code compiled with clang:
>
> #include
>
> int main() {
> long double x = std::cbrtl(0.0L);
> printf("%Lf", x);
>
> return 0;
> }
I just did a test with g++. I had to modify the code a bit to prevent the compiler replacing the cbrtl() call with just a zero:
#include
#include
int main() {
volatile long double arg{0.0L};
long double x = std::cbrtl(arg);
printf("%Lf", x);
return 0;
}
This seems to work OK, both default and -m32.
The asm for that is
00000000004011a5 :
4011a5: 55 push %rbp
4011a6: 48 89 e5 mov %rsp,%rbp
4011a9: 48 83 ec 20 sub $0x20,%rsp
4011ad: d9 ee fldz
4011af: db 7d e0 fstpt -0x20(%rbp)
4011b2: db 6d e0 fldt -0x20(%rbp)
4011b5: 48 8d 64 24 f0 lea -0x10(%rsp),%rsp
4011ba: db 3c 24 fstpt (%rsp)
4011bd: e8 8e fe ff ff callq 401050
4011c2: 48 83 c4 10 add $0x10,%rsp
4011c6: db 7d f0 fstpt -0x10(%rbp)
4011c9: ff 75 f8 pushq -0x8(%rbp)
4011cc: ff 75 f0 pushq -0x10(%rbp)
4011cf: bf 04 20 40 00 mov $0x402004,%edi
4011d4: b8 00 00 00 00 mov $0x0,%eax
4011d9: e8 62 fe ff ff callq 401040
4011de: 48 83 c4 10 add $0x10,%rsp
4011e2: b8 00 00 00 00 mov $0x0,%eax
4011e7: c9 leaveq
4011e8: c3 retq
I'll have a go with clang++ at home tonight.
A+
Paul
|
|
From: Vladislav Y. <vl...@so...> - 2021-10-20 15:12:49
|
Hi,
I am using Valgrind 3.17.0 and noticed a strange behavior while running a
code compiled with clang:
#include <cmath>
#include <cstdio>
int main() {
long double x = std::cbrtl(0.0L);
printf("%Lf", x);
return 0;
}
This example gives complete wrong output:
clang++ cbrtl.cpp -o cbrtl && valgrind ./cbrtl
==338929== Memcheck, a memory error detector
==338929== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==338929== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright
info
==338929== Command: ./cbrtl
==338929==
-0.178840
==338929==
==338929== HEAP SUMMARY:
==338929== in use at exit: 0 bytes in 0 blocks
==338929== total heap usage: 2 allocs, 2 frees, 73,728 bytes allocated
==338929==
==338929== All heap blocks were freed -- no leaks are possible
==338929==
==338929== For lists of detected and suppressed errors, rerun with: -s
==338929== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
However, using -m32 option for clang or gcc compiler (both 32 and 64-bit)
prints 0.0 as expected. I know that valgrind does not support 80-bit long
double and converts it to 64-bit.
I think it might cause this issue as the original code is compiled for
80-bit long doubles. It also might be an issue with clang.
Regards,
Vlad Yaglamunov
|
|
From: Paul F. <pj...@wa...> - 2021-10-14 06:13:45
|
On 10/12/21 10:13 PM, Mark Wielaard wrote: > An RC1 tarball for 3.18.0 is now available at > https://sourceware.org/pub/valgrind/valgrind-3.18.0.RC1.tar.bz2 > (md5sum = 6babaf9e145055a2c9b50cbd2ddfefc0) > (sha1sum = ccc73895097cba83cf7664b02edc66866e98a31b) > > Please give it a try in configurations that are important for you and > report any problems you have, either on this mailing list, or > (preferably) via our bug tracker at > https://bugs.kde.org/enter_bug.cgi?product=valgrind > > If nothing critical emerges, a final release will happen on Friday > 15 October. Hi Mark I've tested on FreeBSD 12.2 and 13.0. Both as expected. Additionally I've tried Solaris 11.3 (OK and no change) and macOS 10.7.5 (not very good but no change either). It's a green light for me. Cheers Paul |
|
From: Mark W. <ma...@kl...> - 2021-10-12 22:14:02
|
An RC1 tarball for 3.18.0 is now available at https://sourceware.org/pub/valgrind/valgrind-3.18.0.RC1.tar.bz2 (md5sum = 6babaf9e145055a2c9b50cbd2ddfefc0) (sha1sum = ccc73895097cba83cf7664b02edc66866e98a31b) Please give it a try in configurations that are important for you and report any problems you have, either on this mailing list, or (preferably) via our bug tracker at https://bugs.kde.org/enter_bug.cgi?product=valgrind If nothing critical emerges, a final release will happen on Friday 15 October. Note that the NEWS file hasn't been fully updated yet. |
|
From: Mark R. <ma...@cs...> - 2021-10-04 02:40:20
|
If I run the exact same version of my Valgrind based tool on the exact same target binary but on different disk drives I get a different result. I understand that different block sizes on the two drives might cause different paths through the C runtime, but I would expect the user program to have the exact same results. The difference appears to be the processing of the instruction (on AMD64): callq 400c50 <fputs@plt> I understand how the plt/got code works in general, but I am curious as to how Valgrind treats it. I am using the trace-flags option to observe the program flow of control. So the two program executions are basically matching until we get to the second time the program calls fputs. In one case, the next SB processed starts with the instruction after the call. In the other case, it appears the indirect call sends us out into the middle of the clib routine _IO_default_xsputn as that is the next SB processed. Then the next SB after that one is the instruction after the call as in the first case. As my program is using Valgrind to do code instrumentation, the addition of the extra xsputn SB has a knock on effect that changes the program output. I am assuming that previously translated SBs are 'skipped' in the trace-flags output. Is there an option to show that SB <number> is being executed again? That is, show the complete flow of control for the program? Assuming my program has not trashed Valgrind in some way, could it be possible that _IO_default_xsputn is a portion of the code for fputs that was not needed in one case do to the difference in disk block sizes? Thank you, Mark Roberts UW PLSE group |
|
From: Eric C. <Eri...@gi...> - 2021-09-08 03:46:55
|
Hi John,
On 2021-09-03 6:53 p.m., John Reiser wrote:
> On 9/3/21 12:31 PM, Eric Chamberland wrote:
>> Hi,
>>
>> I have a simple test and valgrind seems to not see the error:
>>
>> cat fread.cc && clang++ -o fread fread.cc && valgrind ./fread
>> #include <iostream>
>> #include <stdio.h>
>> #include <stdlib.h>
>>
>> int main(int argc, char ** argv){
>> int lA {1};
>> FILE * f = fopen ( argv[0] , "rb" );
>> fread(&lA,2*sizeof(int),1,f);
>> std::cout << "Hello: "<< lA << std::endl;
>> return 0;
>> }
>
> This report is interesting only because it is a bad example:
> it does not specify what is the supposed error.
> If you don't say what you believe it is, then how are valgrind
> developers to know?
Yes, indeed, sorry for not giving a good example!
>
> Besides, the "memcheck error" is covered in the valgrind FAQ.
> Look it up in paragraph "4.6. Why doesn't Memcheck find ..."
Ok, thanks, the answer was there :
https://valgrind.org/docs/manual/faq.html#faq.overruns
> The second and third errors are the logic errors of not checking
> the return value of fopen and fread.
> The fourth error is not documenting the expected invocation command line.
> The fifth error is not checking argc.
> The sixth error is not documenting the expected format of the input file.
> Are you sure that you really are a programmer?
I am happy with your answer, no need to dive into this: you helped
someone! :)
Thanks again John!
Eric
>
>
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42
|
|
From: Alvaro K. <ku...@gm...> - 2021-09-06 12:25:20
|
Yes, I installed debuginfo to try gdb reverse-step. The packages installed where: debuginfo-install glibc-2.33-20.fc34.x86_64 libgcc-11.2.1-1.fc34.x86_64 libstdc++-11.2.1-1.fc34.x86_64 On Mon, Sep 6, 2021 at 8:37 AM Mark Wielaard <ma...@kl...> wrote: > Hi, > > On Sun, 2021-09-05 at 20:29 -0300, Alvaro Kuolas wrote: > > I am running valgrind on my PC with dual boot Windows 10 and Fedora > > 34. > > > > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) > > valgrind runs > > in less than a second, but on Fedora 34 is very slow, several minutes > > slow. > > > > On Fedora 34 it looks like the time spent is reading symbols. > > Do you have lots of debuginfo packages installed or is the > DEBUGINFOD_URLS set? See https://fedoraproject.org/wiki/Debuginfod > > valgrind is fairly slow parsing all the DWARF information. But will > happily use debuginfod to fetch more or use all debuginfo packages > installed for any library you have installed. > > In your case it might be help unsetting DEBUGINFOD_URLS and looking > trough the list of installed debuginfo packages and uninstall some (if > I read your log it is probably libstdc++-debuginfo that takes a lot of > time to parse. > > Cheers, > > Mark > |
|
From: Mark W. <ma...@kl...> - 2021-09-06 12:03:13
|
Hi, On Sun, 2021-09-05 at 20:29 -0300, Alvaro Kuolas wrote: > I am running valgrind on my PC with dual boot Windows 10 and Fedora > 34. > > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) > valgrind runs > in less than a second, but on Fedora 34 is very slow, several minutes > slow. > > On Fedora 34 it looks like the time spent is reading symbols. Do you have lots of debuginfo packages installed or is the DEBUGINFOD_URLS set? See https://fedoraproject.org/wiki/Debuginfod valgrind is fairly slow parsing all the DWARF information. But will happily use debuginfod to fetch more or use all debuginfo packages installed for any library you have installed. In your case it might be help unsetting DEBUGINFOD_URLS and looking trough the list of installed debuginfo packages and uninstall some (if I read your log it is probably libstdc++-debuginfo that takes a lot of time to parse. Cheers, Mark |
|
From: Alvaro K. <ku...@gm...> - 2021-09-06 02:39:31
|
My program is very simple: they are exercises from a course about ADT (Abstract Data Types). On Sun, Sep 5, 2021 at 11:24 PM John Borland < all...@gm...> wrote: > if you have a lot of threads you can try the fair scheduler flag. > > On Sun, Sep 5, 2021, 8:59 PM John Reiser <jr...@bi...> wrote: > >> > I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. >> > >> > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind >> runs in less than a second, but on Fedora 34 is very slow, several minutes >> slow. >> > >> > On Fedora 34 it looks like the time spent is reading symbols. >> > >> > This is the part that takes most of the time: >> > >> > --23524-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 >> > --23524-- Considering >> /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. >> > --23524-- .. build-id is valid >> > --23524-- Considering >> /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 >> .. >> > --23524-- .. build-id is valid >> [[snip]] >> > >> > What could be the problem? GGC 11 perhaps? >> >> There have been some hints of trouble with the DWARF-5 symbol reader. >> Thus a work-around might be to avoid DWARF-5 by using an older gcc. >> >> If you can, please run "perf record" and then "perf report", >> and copy+paste (or attach) info into a Bug Report (see >> https://valgrind.org). >> Then post the bug link here with a teaser. >> >> >> >> _______________________________________________ >> Valgrind-users mailing list >> Val...@li... >> https://lists.sourceforge.net/lists/listinfo/valgrind-users >> > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Alvaro K. <ku...@gm...> - 2021-09-06 02:36:10
|
I opened a bug report https://bugs.kde.org/show_bug.cgi?id=442061 I have attached perf-record data Thanks for your help! On Sun, Sep 5, 2021 at 10:59 PM John Reiser <jr...@bi...> wrote: > > I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. > > > > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind > runs in less than a second, but on Fedora 34 is very slow, several minutes > slow. > > > > On Fedora 34 it looks like the time spent is reading symbols. > > > > This is the part that takes most of the time: > > > > --23524-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 > > --23524-- Considering > /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. > > --23524-- .. build-id is valid > > --23524-- Considering > /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 > .. > > --23524-- .. build-id is valid > [[snip]] > > > > What could be the problem? GGC 11 perhaps? > > There have been some hints of trouble with the DWARF-5 symbol reader. > Thus a work-around might be to avoid DWARF-5 by using an older gcc. > > If you can, please run "perf record" and then "perf report", > and copy+paste (or attach) info into a Bug Report (see > https://valgrind.org). > Then post the bug link here with a teaser. > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: John B. <all...@gm...> - 2021-09-06 02:23:02
|
if you have a lot of threads you can try the fair scheduler flag. On Sun, Sep 5, 2021, 8:59 PM John Reiser <jr...@bi...> wrote: > > I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. > > > > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind > runs in less than a second, but on Fedora 34 is very slow, several minutes > slow. > > > > On Fedora 34 it looks like the time spent is reading symbols. > > > > This is the part that takes most of the time: > > > > --23524-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 > > --23524-- Considering > /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. > > --23524-- .. build-id is valid > > --23524-- Considering > /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 > .. > > --23524-- .. build-id is valid > [[snip]] > > > > What could be the problem? GGC 11 perhaps? > > There have been some hints of trouble with the DWARF-5 symbol reader. > Thus a work-around might be to avoid DWARF-5 by using an older gcc. > > If you can, please run "perf record" and then "perf report", > and copy+paste (or attach) info into a Bug Report (see > https://valgrind.org). > Then post the bug link here with a teaser. > > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: John R. <jr...@bi...> - 2021-09-06 01:58:29
|
> I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. > > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind runs in less than a second, but on Fedora 34 is very slow, several minutes slow. > > On Fedora 34 it looks like the time spent is reading symbols. > > This is the part that takes most of the time: > > --23524-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 > --23524-- Considering /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. > --23524-- .. build-id is valid > --23524-- Considering /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 .. > --23524-- .. build-id is valid [[snip]] > > What could be the problem? GGC 11 perhaps? There have been some hints of trouble with the DWARF-5 symbol reader. Thus a work-around might be to avoid DWARF-5 by using an older gcc. If you can, please run "perf record" and then "perf report", and copy+paste (or attach) info into a Bug Report (see https://valgrind.org). Then post the bug link here with a teaser. |
|
From: Alvaro K. <ku...@gm...> - 2021-09-06 01:30:29
|
This is using valgrind compiled from GIT sources using my test program: [alvarok@YELLOWJACKET tarea5]$ valgrind -v ./principal ==45395== Memcheck, a memory error detector ==45395== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==45395== Using Valgrind-3.18.0.GIT-1bee3ab757-20210901 and LibVEX; rerun with -h for copyright info ==45395== Command: ./principal ==45395== --45395-- Valgrind options: --45395-- -v --45395-- Contents of /proc/version: --45395-- Linux version 5.13.13-200.fc34.x86_64 ( moc...@bk...) (gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1), GNU ld version 2.35.2-5.fc34) #1 SMP Thu Aug 26 17:06:39 UTC 2021 --45395-- --45395-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed --45395-- Page sizes: currently 4096, max supported 4096 --45395-- Valgrind library directory: /usr/local/libexec/valgrind --45395-- Reading syms from /home/alvarok/Development/Skills/Prog2/Laboratorio/Tarea5/tarea5/principal --45395-- Reading syms from /usr/lib64/ld-2.33.so --45395-- Warning: cross-CU LIMITATION: some inlined fn names --45395-- might be shown as UnknownInlinedFun --45395-- Reading syms from /usr/local/libexec/valgrind/memcheck-amd64-linux --45395-- object doesn't have a dynamic symbol table --45395-- Scheduler: using generic scheduler lock implementation. --45395-- Reading suppressions file: /usr/local/libexec/valgrind/default.supp ==45395== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-45395-by-alvarok-on-YELLOWJACKET ==45395== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-45395-by-alvarok-on-YELLOWJACKET ==45395== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-45395-by-alvarok-on-YELLOWJACKET ==45395== ==45395== TO CONTROL THIS PROCESS USING vgdb (which you probably ==45395== don't want to do, unless you know exactly what you're doing, ==45395== or are doing some strange experiment): ==45395== /usr/local/libexec/valgrind/../../bin/vgdb --pid=45395 ...command... ==45395== ==45395== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==45395== /path/to/gdb ./principal ==45395== and then give GDB the following command ==45395== target remote | /usr/local/libexec/valgrind/../../bin/vgdb --pid=45395 ==45395== --pid is optional if only one valgrind process is running ==45395== --45395-- REDIR: 0x4025130 (ld-linux-x86-64.so.2:strlen) redirected to 0x580b31e2 (vgPlain_amd64_linux_REDIR_FOR_strlen) --45395-- REDIR: 0x4024f00 (ld-linux-x86-64.so.2:index) redirected to 0x580b31fc (vgPlain_amd64_linux_REDIR_FOR_index) --45395-- Reading syms from /usr/local/libexec/valgrind/vgpreload_core-amd64-linux.so --45395-- Reading syms from /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-linux.so ==45395== WARNING: new redirection conflicts with existing -- ignoring it --45395-- old: 0x04025130 (strlen ) R-> (0000.0) 0x580b31e2 vgPlain_amd64_linux_REDIR_FOR_strlen --45395-- new: 0x04025130 (strlen ) R-> (2007.0) 0x048463c0 strlen --45395-- REDIR: 0x4021910 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4847220 (strcmp) --45395-- REDIR: 0x4025690 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x484ac90 (mempcpy) --45395-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 --45395-- Considering /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. --45395-- .. build-id is valid --45395-- Considering /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 .. --45395-- .. build-id is valid --45395-- Reading syms from /usr/lib64/libm-2.33.so --45395-- Considering /usr/lib/debug/.build-id/c1/784bbe8a93a6e62f74b16105a2076a03b398ac.debug .. --45395-- .. build-id is valid --45395-- Reading syms from /usr/lib64/libgcc_s-11-20210728.so.1 --45395-- Considering /usr/lib/debug/.build-id/46/e10c9ee769c5cfc7cdb638e3ccbc3169c0a949.debug .. --45395-- .. build-id is valid --45395-- Considering /usr/lib/debug/.build-id/46/../../../../../usr/lib/debug/lib64/../.dwz/gcc-11.2.1-1.fc34.x86_64 .. --45395-- .. build-id is valid --45395-- Reading syms from /usr/lib64/libc-2.33.so --45395-- Considering /usr/lib/debug/.build-id/9d/e0f6e78ec16db4c6c167efc6b37466705edeff.debug .. --45395-- .. build-id is valid --45395-- Considering /usr/lib/debug/.build-id/9d/../../../../../usr/lib/debug/lib64/../.dwz/glibc-2.33-20.fc34.x86_64 .. --45395-- .. build-id is valid --45395-- REDIR: 0x4c6eee0 (libc.so.6:memmove) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) ==45395== Preferring higher priority redirection: --45395-- old: 0x04d41710 (__memcpy_avx_unalign) R-> (2018.0) 0x04848470 __memcpy_avx_unaligned_erms --45395-- new: 0x04d41710 (__memcpy_avx_unalign) R-> (2018.1) 0x04849d10 memmove --45395-- REDIR: 0x4c6e3e0 (libc.so.6:strncpy) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f220 (libc.so.6:strcasecmp) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6de90 (libc.so.6:strcat) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e440 (libc.so.6:rindex) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c705d0 (libc.so.6:rawmemchr) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c88680 (libc.so.6:wmemchr) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c881c0 (libc.so.6:wcscmp) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f040 (libc.so.6:mempcpy) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6ee70 (libc.so.6:bcmp) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e380 (libc.so.6:strncmp) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6df40 (libc.so.6:strcmp) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6efb0 (libc.so.6:memset) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c88180 (libc.so.6:wcschr) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e2e0 (libc.so.6:strnlen) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e020 (libc.so.6:strcspn) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f270 (libc.so.6:strncasecmp) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6dfc0 (libc.so.6:strcpy) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f3c0 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c898d0 (libc.so.6:wcsnlen) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c88200 (libc.so.6:wcscpy) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e480 (libc.so.6:strpbrk) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6def0 (libc.so.6:index) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e2a0 (libc.so.6:strlen) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c74a80 (libc.so.6:memrchr) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f2c0 (libc.so.6:strcasecmp_l) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6ee30 (libc.so.6:memchr) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c882d0 (libc.so.6:wcslen) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6e5a0 (libc.so.6:strspn) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f1c0 (libc.so.6:stpncpy) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f160 (libc.so.6:stpcpy) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c70610 (libc.so.6:strchrnul) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4c6f310 (libc.so.6:strncasecmp_l) redirected to 0x48351b6 (_vgnU_ifunc_wrapper) --45395-- REDIR: 0x4d3e530 (libc.so.6:__strrchr_avx2) redirected to 0x4845e00 (rindex) --45395-- REDIR: 0x4c6a100 (libc.so.6:malloc) redirected to 0x4840739 (malloc) --45395-- REDIR: 0x490da50 (libstdc++.so.6:operator new(unsigned long)) redirected to 0x4840ea3 (operator new(unsigned long)) --45395-- REDIR: 0x490dab0 (libstdc++.so.6:operator new[](unsigned long)) redirected to 0x4842095 (operator new[](unsigned long)) --45395-- REDIR: 0x4d3e340 (libc.so.6:__strchrnul_avx2) redirected to 0x484a790 (strchrnul) --45395-- REDIR: 0x4d416f0 (libc.so.6:__mempcpy_avx_unaligned_erms) redirected to 0x484a8a0 (mempcpy) 1>Fin --45395-- REDIR: 0x4d39bf0 (libc.so.6:__strcmp_avx2) redirected to 0x4847120 (strcmp) --45395-- REDIR: 0x4d3e700 (libc.so.6:__strlen_avx2) redirected to 0x48462a0 (strlen) Fin. --45395-- REDIR: 0x4d3a560 (libc.so.6:__memchr_avx2) redirected to 0x48472a0 (memchr) --45395-- REDIR: 0x4d41710 (libc.so.6:__memcpy_avx_unaligned_erms) redirected to 0x4849d10 (memmove) --45395-- REDIR: 0x490bd00 (libstdc++.so.6:operator delete(void*, unsigned long)) redirected to 0x48436d3 (operator delete(void*, unsigned long)) --45395-- REDIR: 0x490bd20 (libstdc++.so.6:operator delete[](void*)) redirected to 0x48443f9 (operator delete[](void*)) --45395-- REDIR: 0x4c6a760 (libc.so.6:free) redirected to 0x4842f0e (free) ==45395== ==45395== HEAP SUMMARY: ==45395== in use at exit: 0 bytes in 0 blocks ==45395== total heap usage: 23 allocs, 23 frees, 75,192 bytes allocated ==45395== ==45395== All heap blocks were freed -- no leaks are possible ==45395== ==45395== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) On Sun, Sep 5, 2021 at 8:29 PM Alvaro Kuolas <ku...@gm...> wrote: > Hello everyone! > > I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. > > Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind > runs in less than a second, but on Fedora 34 is very slow, several minutes > slow. > > On Fedora 34 it looks like the time spent is reading symbols. > > This is the part that takes most of the time: > > --23524-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 > --23524-- Considering > /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. > --23524-- .. build-id is valid > --23524-- Considering > /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 > .. > --23524-- .. build-id is valid > --23524-- Reading syms from /usr/lib64/libm-2.33.so > --23524-- Considering > /usr/lib/debug/.build-id/c1/784bbe8a93a6e62f74b16105a2076a03b398ac.debug .. > --23524-- .. build-id is valid > --23524-- Reading syms from /usr/lib64/libgcc_s-11-20210728.so.1 > --23524-- Considering > /usr/lib/debug/.build-id/46/e10c9ee769c5cfc7cdb638e3ccbc3169c0a949.debug .. > --23524-- .. build-id is valid > --23524-- Considering > /usr/lib/debug/.build-id/46/../../../../../usr/lib/debug/lib64/../.dwz/gcc-11.2.1-1.fc34.x86_64 > .. > --23524-- .. build-id is valid > --23524-- Reading syms from /usr/lib64/libc-2.33.so > --23524-- Considering > /usr/lib/debug/.build-id/9d/e0f6e78ec16db4c6c167efc6b37466705edeff.debug .. > --23524-- .. build-id is valid > --23524-- Considering > /usr/lib/debug/.build-id/9d/../../../../../usr/lib/debug/lib64/../.dwz/glibc-2.33-20.fc34.x86_64 > .. > --23524-- .. build-id is valid > > What could be the problem? GGC 11 perhaps? > > Thanks! > |
|
From: Alvaro K. <ku...@gm...> - 2021-09-05 23:30:01
|
Hello everyone! I am running valgrind on my PC with dual boot Windows 10 and Fedora 34. Running the same test on Ubuntu 20.04 (under Windows 10 WSL2) valgrind runs in less than a second, but on Fedora 34 is very slow, several minutes slow. On Fedora 34 it looks like the time spent is reading symbols. This is the part that takes most of the time: --23524-- Reading syms from /usr/lib64/libstdc++.so.6.0.29 --23524-- Considering /usr/lib/debug/.build-id/bd/d633ff5da0bba64d19ecf277a9eed7001da127.debug .. --23524-- .. build-id is valid --23524-- Considering /usr/lib/debug/.build-id/bd/../../../../../usr/lib/debug/usr/lib64/../../.dwz/gcc-11.2.1-1.fc34.x86_64 .. --23524-- .. build-id is valid --23524-- Reading syms from /usr/lib64/libm-2.33.so --23524-- Considering /usr/lib/debug/.build-id/c1/784bbe8a93a6e62f74b16105a2076a03b398ac.debug .. --23524-- .. build-id is valid --23524-- Reading syms from /usr/lib64/libgcc_s-11-20210728.so.1 --23524-- Considering /usr/lib/debug/.build-id/46/e10c9ee769c5cfc7cdb638e3ccbc3169c0a949.debug .. --23524-- .. build-id is valid --23524-- Considering /usr/lib/debug/.build-id/46/../../../../../usr/lib/debug/lib64/../.dwz/gcc-11.2.1-1.fc34.x86_64 .. --23524-- .. build-id is valid --23524-- Reading syms from /usr/lib64/libc-2.33.so --23524-- Considering /usr/lib/debug/.build-id/9d/e0f6e78ec16db4c6c167efc6b37466705edeff.debug .. --23524-- .. build-id is valid --23524-- Considering /usr/lib/debug/.build-id/9d/../../../../../usr/lib/debug/lib64/../.dwz/glibc-2.33-20.fc34.x86_64 .. --23524-- .. build-id is valid What could be the problem? GGC 11 perhaps? Thanks! |
|
From: John R. <jr...@bi...> - 2021-09-03 22:53:28
|
On 9/3/21 12:31 PM, Eric Chamberland wrote:
> Hi,
>
> I have a simple test and valgrind seems to not see the error:
>
> cat fread.cc && clang++ -o fread fread.cc && valgrind ./fread
> #include <iostream>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char ** argv){
> int lA {1};
> FILE * f = fopen ( argv[0] , "rb" );
> fread(&lA,2*sizeof(int),1,f);
> std::cout << "Hello: "<< lA << std::endl;
> return 0;
> }
This report is interesting only because it is a bad example:
it does not specify what is the supposed error.
If you don't say what you believe it is, then how are valgrind developers to know?
Besides, the "memcheck error" is covered in the valgrind FAQ.
Look it up in paragraph "4.6. Why doesn't Memcheck find ..."
The second and third errors are the logic errors of not checking
the return value of fopen and fread.
The fourth error is not documenting the expected invocation command line.
The fifth error is not checking argc.
The sixth error is not documenting the expected format of the input file.
Are you sure that you really are a programmer?
|
|
From: Eric C. <Eri...@gi...> - 2021-09-03 19:46:50
|
Hi,
I have a simple test and valgrind seems to not see the error:
cat fread.cc && clang++ -o fread fread.cc && valgrind ./fread
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char ** argv){
int lA {1};
FILE * f = fopen ( argv[0] , "rb" );
fread(&lA,2*sizeof(int),1,f);
std::cout << "Hello: "<< lA << std::endl;
return 0;
}
==16241== Memcheck, a memory error detector
==16241== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==16241== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==16241== Command: ./fread
==16241==
Hello: 1179403647
==16241==
==16241== HEAP SUMMARY:
==16241== in use at exit: 472 bytes in 1 blocks
==16241== total heap usage: 4 allocs, 3 frees, 78,296 bytes allocated
==16241==
==16241== LEAK SUMMARY:
==16241== definitely lost: 0 bytes in 0 blocks
==16241== indirectly lost: 0 bytes in 0 blocks
==16241== possibly lost: 0 bytes in 0 blocks
==16241== still reachable: 472 bytes in 1 blocks
==16241== suppressed: 0 bytes in 0 blocks
==16241== Rerun with --leak-check=full to see details of leaked memory
==16241==
==16241== For lists of detected and suppressed errors, rerun with: -s
==16241== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
We just discovered this error that we got into our code since many
years... and even if we use valgrind it didn't detected it...
Is there any command line options I can add to valgrind to make it
detect the error?
Thanks,
Eric
--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42
|
|
From: John R. <jr...@bi...> - 2021-08-21 22:45:05
|
> I'm using Valgrind 3-13-0 on Ubuntu 18.04. The package repository has 3-13-0 as its latest version, so if I want 3-17-0 I will need to install from source. But my question is about AVX instructions that have been supported since before 3-13-0. Copy+Paste the entire error message here, including the dump of the actual hex instruction bytes. (You may hide the names of your files, if you wish.) |
|
From: Mark <mr...@pr...> - 2021-08-21 20:41:22
|
Hello, I'm using Valgrind 3-13-0 on Ubuntu 18.04. The package repository has 3-13-0 as its latest version, so if I want 3-17-0 I will need to install from source. But my question is about AVX instructions that have been supported since before 3-13-0. I ran the following command format: valgrind --tool=memcheck ./(Program_name).exe I ran this command on three separate programs, all of which have AVX instructions. In all three cases Valgrind terminated at the first line that contained an AVX instruction with "Unrecognised instruction." According https://stackoverflow.com/questions/31009094/valgrind-illegal-instruction-avx, support for AVX was added in 3.8.0 and for AVX2 in 3.9.0. Two of the instructions in question are AVX instructions: vmovupd xmm31,[const_1.962]. This is an AVX instruction, see https://www.felixcloutier.com/x86/movupd, where VMOVUPD xmm1, xmm2/m128 is listed as an AVX instruction. vaddsd xmm20,xmm0,xmm1 This is also an AVX instruction, see https://www.felixcloutier.com/x86/addsd. The three operand form (without masks) is AVX. VADDSD xmm1, xmm2, xmm3/m64 (AVX) Why does Valgrind terminate at those AVX instructions when support was added before 3-13-0? Thanks very much. |
|
From: Schmidt, A. <adr...@si...> - 2021-08-17 11:20:38
|
> > > > To me it seems that Helgrind itself is causing the warning when > > calculating mutex_is_init (hg_intercepts.c:859). > > Isn't this rather a race between unlocking a mutex and destroying that mutex? I'm not sure... I know it's not a very strong argument, but the Poco::Timer code is not that complex, and I could not find anything wrong with it. What puzzles me is that the location Helgrind reports is "inside" the mutex object itself. Is it even possible to create a race on the memory location of a mutex, when only accessing it through the pthread_mutex_* API? |