From kde-bugs-dist Tue Oct 31 18:38:04 2017 From: Carl Love Date: Tue, 31 Oct 2017 18:38:04 +0000 To: kde-bugs-dist Subject: [valgrind] [Bug 386397] New: valgrind truncates powerpc timebase to 32-bits Message-Id: X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=150947509925467 https://bugs.kde.org/show_bug.cgi?id=3D386397 Bug ID: 386397 Summary: valgrind truncates powerpc timebase to 32-bits Product: valgrind Version: 3.14 SVN Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: vex Assignee: jseward@acm.org Reporter: cel@us.ibm.com Target Milestone: --- ---Problem Description--- Valgrind is incorrectly modeling the PowerPC timebase register as 32-bit.=20 Should be 64-bit.=20=20 ---uname output--- Linux c650f07p23 4.11.0-42.el7a.ppc64le #1 SMP Mon Oct 9 12:00:22 EDT 2017 ppc64le ppc64le ppc64le GNU/Linux Machine Type =3D 8335-GTC=20 ---Debugger--- A debugger is not configured ---Steps to Reproduce--- Compile the following example using "gcc -o tb tb.c" and execute. Without Valgrind, program will display timebase as 64-bit values. With Valgrind, timebase will be limited to 32-bit values and the 2nd timebase printf may appear to be lesser than the first timebase printf. #include #include int main(int argc, char** argv) { uint64_t tb =3D __ppc_get_timebase(); printf("timebase =3D %lx\n", tb); sleep(15); tb =3D __ppc_get_timebase(); printf("timebase =3D %lx\n", tb); return 0; } Contact Information =3D Tom Gooding / tgooding@us.ibm.com=20 Userspace tool common name: valgrind=20 The userspace tool has the following bit modes: 64-bit=20 Userspace rpm: valgrind-3.12.0-9.el7_4.ppc64le=20 Userspace tool obtained from project website: na=20 *Additional Instructions for Tom Gooding / tgooding@us.ibm.com: -Attach ltrace and strace of userspace application. [reply] [-] Internal Only Comment 1 Thomas M. Gooding 2017-10-30 22:48:33 CDT output: bash-4.2$ ./tb timebase =3D 3be626e90262 timebase =3D 3be7f0ad4167 bash-4.2$ valgrind ./tb =3D=3D89099=3D=3D Memcheck, a memory error detector =3D=3D89099=3D=3D Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward = et al. =3D=3D89099=3D=3D Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyr= ight info =3D=3D89099=3D=3D Command: ./tb =3D=3D89099=3D=3D=20 timebase =3D 8ab00ec0 timebase =3D 552cacc9 =3D=3D89099=3D=3D=20 =3D=3D89099=3D=3D HEAP SUMMARY: =3D=3D89099=3D=3D in use at exit: 0 bytes in 0 blocks =3D=3D89099=3D=3D total heap usage: 0 allocs, 0 frees, 0 bytes allocated =3D=3D89099=3D=3D=20 =3D=3D89099=3D=3D All heap blocks were freed -- no leaks are possible =3D=3D89099=3D=3D=20 =3D=3D89099=3D=3D For counts of detected and suppressed errors, rerun with:= -v =3D=3D89099=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 fr= om 0) Issue reported by Thomas M. Gooding --=20 You are receiving this mail because: You are watching all bug changes.=