|
From: Roland M. <rol...@nr...> - 2013-03-11 12:22:01
|
Hi!
----
Does anyone know what's going wrong in the example below:
-- snip --
$ cat helloworld.c
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
volatile long double foo;
void blabla2(volatile long double *arg)
{
static int foo=2;
printf("sum=%d\n", ((int)*arg)+foo);
}
void blabla(int arg1)
{
foo=truncl(1.6L)+arg1;
blabla2(&foo);
}
int main(int ac, char *av[])
{
blabla(atoi("4"));
return EXIT_SUCCESS;
}
$ rm -f ./helloworld ; clang -g helloworld.c -lm -o helloworld
$ valgrind --track-origins=yes --read-var-info=yes ./helloworld
==6451== Memcheck, a memory error detector
==6451== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==6451== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==6451== Command: ./helloworld
==6451==
parse_var_DIE: confused by:
<0><101>: DW_TAG_compile_unit
DW_AT_producer : (indirect string, offset: 0xbf): clang
version 3.1 (branches/release_31 157047)
DW_AT_language : 12
DW_AT_name : (indirect string, offset: 0xee): helloworld.c
DW_AT_low_pc : 0x0
DW_AT_stmt_list : 136
DW_AT_comp_dir : (indirect string, offset: 0xfb):
/home/test001/tmp/dwarf4valgrind
--6451-- WARNING: Serious error when reading debug info
--6451-- When reading debug info from
/home/test001/tmp/dwarf4valgrind/helloworld:
--6451-- parse_var_DIE: confused by the above DIE
sum=7
==6451==
==6451== HEAP SUMMARY:
==6451== in use at exit: 0 bytes in 0 blocks
==6451== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==6451==
==6451== All heap blocks were freed -- no leaks are possible
==6451==
==6451== For counts of detected and suppressed errors, rerun with: -v
==6451== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
$ clang --version
clang version 3.1 (branches/release_31 157047)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ valgrind --version
valgrind-3.7.0
-- snip --
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) rol...@nr...
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
|
|
From: Tom H. <to...@co...> - 2013-03-11 12:32:19
|
On 11/03/13 12:21, Roland Mainz wrote: > Does anyone know what's going wrong in the example below: Yes - it's using DWZ compression (hence the "indirect" string) and that is not yet supported in valgrind. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Roland M. <rol...@nr...> - 2013-03-11 12:34:25
|
On Mon, Mar 11, 2013 at 1:32 PM, Tom Hughes <to...@co...> wrote: > On 11/03/13 12:21, Roland Mainz wrote: >> Does anyone know what's going wrong in the example below: > Yes - it's using DWZ compression (hence the "indirect" string) and that is > not yet supported in valgrind. Grumpf... ;-( Is there any workaround ? ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) rol...@nr... \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) |
|
From: Tom H. <to...@co...> - 2013-03-11 12:39:29
|
On 11/03/13 12:34, Roland Mainz wrote: > On Mon, Mar 11, 2013 at 1:32 PM, Tom Hughes <to...@co...> wrote: >> On 11/03/13 12:21, Roland Mainz wrote: >>> Does anyone know what's going wrong in the example below: >> Yes - it's using DWZ compression (hence the "indirect" string) and that is >> not yet supported in valgrind. > > Grumpf... ;-( > > Is there any workaround ? Actually I'm wrong - it is handled in 3.8.0 and later so you just need to update. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |