Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When running valgrind testsuite on ppc64. We sometimes see the following error:
test_touch_tm.c:11:23: error: builtin __builtin_tabortdc is only valid in 64-bit mode
__builtin_tabortdc (0,0,0);
^
test_touch_tm.c:12:24: error: builtin __builtin_tabortdci is only valid in 64-bit mode
__builtin_tabortdci (0,0,0);
^
make[6]: *** [test_touch_tm-test_touch_tm.o] Error 1
make[5]: *** [check-am] Error 2
make[4]: *** [check-recursive] Error 1
make[3]: *** [check-recursive] Error 1
make[2]: *** [check-recursive] Error 1
make[1]: *** [check] Error 2
It aborts entire testsuite. Which means no results. :(
Version-Release number of selected component (if applicable):
valgrind-3.10.0-14.el7
Steps to Reproduce:
1. make --quiet regtest
The culprit seems to be test_touch_tm.c testcase.
--- test_touch_tm.c ---
#include <stdio.h>
int main (void) {
#ifdef HAS_ISA_2_07
/* Just get the compiler to generate each of the TM instructions
* so we can verify that valgrind recognizes them.
* For now, only the tbegin instruction does anything in valgrind.
* The rest are just treated as NOPS.
*/
__builtin_tabort (0);
__builtin_tabortdc (0,0,0);
__builtin_tabortdci (0,0,0);
__builtin_tabortwc (0,0,0);
__builtin_tabortwci (0,0,0);
__builtin_tbegin (0);
__builtin_tend (0);
// __builtin_tcheck (0); tcheck not recognized by compiler
__builtin_trechkpt (); // not recognized by early HW
__builtin_treclaim (0); // not recognized by early HW
__builtin_tsr (0);
#endif
return 0;
}
--- --- ---
# gcc -m64 -mhtm -DHAS_ISA_2_07 -Winline -Wall -O -g -mregnames -lm test_touch_tm.c
# gcc -m32 -mhtm -DHAS_ISA_2_07 -Winline -Wall -O -g -mregnames -lm test_touch_tm.c
test_touch_tm.c: In function ‘main’:
test_touch_tm.c:11:23: error: builtin __builtin_tabortdc is only valid in 64-bit mode
__builtin_tabortdc (0,0,0);
^
test_touch_tm.c:12:24: error: builtin __builtin_tabortdci is only valid in 64-bit mode
__builtin_tabortdci (0,0,0);
^
Something like the following seems to fix that:
#ifdef __PPC64__
__builtin_tabortdc (0,0,0);
__builtin_tabortdci (0,0,0);
#endif
Actually, strange thing is that it's in both none/tests/ppc32 and none/tests/ppc64 directories. I can see that upstream has it only in none/tests/ppc64.
(In reply to Miroslav Franc from comment #1)
> Actually, strange thing is that it's in both none/tests/ppc32 and
> none/tests/ppc64 directories. I can see that upstream has it only in
> none/tests/ppc64.
I take that back. There's a symlink.
This is caused by a stricter gcc which no longer accepts __builtin_tabortdc[i] in -m32 mode. The fix to guard those calls with __PPC64__ looks correct.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-2259.html
Description of problem: When running valgrind testsuite on ppc64. We sometimes see the following error: test_touch_tm.c:11:23: error: builtin __builtin_tabortdc is only valid in 64-bit mode __builtin_tabortdc (0,0,0); ^ test_touch_tm.c:12:24: error: builtin __builtin_tabortdci is only valid in 64-bit mode __builtin_tabortdci (0,0,0); ^ make[6]: *** [test_touch_tm-test_touch_tm.o] Error 1 make[5]: *** [check-am] Error 2 make[4]: *** [check-recursive] Error 1 make[3]: *** [check-recursive] Error 1 make[2]: *** [check-recursive] Error 1 make[1]: *** [check] Error 2 It aborts entire testsuite. Which means no results. :( Version-Release number of selected component (if applicable): valgrind-3.10.0-14.el7 Steps to Reproduce: 1. make --quiet regtest The culprit seems to be test_touch_tm.c testcase. --- test_touch_tm.c --- #include <stdio.h> int main (void) { #ifdef HAS_ISA_2_07 /* Just get the compiler to generate each of the TM instructions * so we can verify that valgrind recognizes them. * For now, only the tbegin instruction does anything in valgrind. * The rest are just treated as NOPS. */ __builtin_tabort (0); __builtin_tabortdc (0,0,0); __builtin_tabortdci (0,0,0); __builtin_tabortwc (0,0,0); __builtin_tabortwci (0,0,0); __builtin_tbegin (0); __builtin_tend (0); // __builtin_tcheck (0); tcheck not recognized by compiler __builtin_trechkpt (); // not recognized by early HW __builtin_treclaim (0); // not recognized by early HW __builtin_tsr (0); #endif return 0; } --- --- --- # gcc -m64 -mhtm -DHAS_ISA_2_07 -Winline -Wall -O -g -mregnames -lm test_touch_tm.c # gcc -m32 -mhtm -DHAS_ISA_2_07 -Winline -Wall -O -g -mregnames -lm test_touch_tm.c test_touch_tm.c: In function ‘main’: test_touch_tm.c:11:23: error: builtin __builtin_tabortdc is only valid in 64-bit mode __builtin_tabortdc (0,0,0); ^ test_touch_tm.c:12:24: error: builtin __builtin_tabortdci is only valid in 64-bit mode __builtin_tabortdci (0,0,0); ^ Something like the following seems to fix that: #ifdef __PPC64__ __builtin_tabortdc (0,0,0); __builtin_tabortdci (0,0,0); #endif