folly icon indicating copy to clipboard operation
folly copied to clipboard

Fix cache_locality_test.Getcpu.VdsoGetcpu on aarch64

Open wash-amzn opened this issue 3 years ago • 4 comments

Summary: Getcpu::resolveVdsoFunc() will return null when the vdso does not contain the function __vdso_getcpu, which it does only on x86_64. The test was assuming a non-null return, resulting in segfaults on other platforms such as aarch64.

Testing: I tested this change on x86 and aarch64, both Ubuntu 22.

Example failure on aarch64 before the change:

7/9 Test  #322: cache_locality_test.Getcpu.VdsoGetcpu ......................***Exception: SegFault  0.11 sec
Note: Google Test filter = Getcpu.VdsoGetcpu
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from Getcpu
[ RUN      ] Getcpu.VdsoGetcpu
*** Aborted at 1670948200 (Unix time, try 'date -d @1670948200') ***
*** Signal 11 (SIGSEGV) (0x0) received by PID 54696 (pthread TID 0xffffb5236020) (linux TID 54696) (code: address not mapped to object), stack trace: ***
(error retrieving stack trace)

wash-amzn avatar Dec 16 '22 16:12 wash-amzn

Hi @wash-amzn!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Dec 16 '22 16:12 facebook-github-bot

My employer (Amazon) sent an email to [email protected] on Tuesday, Dec 13 to get me added.

wash-amzn avatar Dec 16 '22 16:12 wash-amzn

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot avatar Dec 21 '22 19:12 facebook-github-bot

@Orvid has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Jan 03 '23 22:01 facebook-github-bot

any chance this will get committed soon?

AGSaidi avatar Mar 27 '23 19:03 AGSaidi

@Orvid merged this pull request in facebook/folly@8e72e8ff093fcbca5ed14e3803d4a13b43788c35.

facebook-github-bot avatar May 09 '23 15:05 facebook-github-bot