This is an archive of the discontinued LLVM Phabricator instance.

[TSan][MIPS64] Fix few more test cases for MIPS64
ClosedPublic

Authored by slthakur on Jan 29 2015, 10:52 PM.

Details

Summary

Test cases fixed :

  • global_race.cc, global_race2.cc, global_race3.cc : File Check expects a 47-bit address in place of ADDR, ADDR2, ADDR3 in the test cases. Used 40-bit address for mips64.
  • map32bit.cc : MAP_32BIT flag for mmap is supported only for x86_64. Marked as XFAIL for mips64.
  • mmap_large.cc : Mmap start address is given according to 47-bit address space. Used 40-bit address for mips64.
  • signal_errno.cc : Stack trace was incorrect because pc was incremented by 1 in tsan_interceptors.cc:1908 in CallUserSignalHandler (). Used StackTrace::GetNextInstructionPC () in place of pc +1.

Diff Detail

Repository
rL LLVM

Event Timeline

slthakur updated this revision to Diff 19025.Jan 29 2015, 10:52 PM
slthakur retitled this revision from to [TSan][MIPS64] Fix few more test cases for MIPS64.
slthakur updated this object.
slthakur edited the test plan for this revision. (Show Details)
slthakur added reviewers: dvyukov, samsonov, kcc.
slthakur set the repository for this revision to rL LLVM.
slthakur added subscribers: dsanders, Anand.Takale, mohit.bhakkad, Unknown Object (MLST).
dvyukov accepted this revision.Jan 29 2015, 11:32 PM
dvyukov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 29 2015, 11:32 PM
samsonov added inline comments.Jan 30 2015, 11:58 AM
lib/tsan/rtl/tsan_interceptors.cc
1898 ↗(On Diff #19025)

Fix a comment here

test/tsan/global_race.cc
19 ↗(On Diff #19025)

Instead of spreading #ifdef around the code, you can introduce the function that prints address with required number of leading zeros, and add it to test/tsan/test.h

slthakur updated this revision to Diff 19136.Feb 2 2015, 1:38 AM
slthakur edited edge metadata.

Addressed review comments by @samsonov

samsonov added inline comments.Feb 2 2015, 3:36 PM
test/tsan/test.h
36 ↗(On Diff #19136)

OMG, why do you need this addr%c at all? Just call

fprintf(stderr, "addr3=");
print_address(XXX::YYY::ZZZ);
fprintf(stderr, "\n");

etc.

slthakur updated this revision to Diff 19210.Feb 2 2015, 9:37 PM

Corrected print_address() function call

samsonov accepted this revision.Feb 3 2015, 10:24 AM
samsonov edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.