Skip to content

Conversation

@wanghan-sanechips
Copy link
Contributor

Fixes RISC-V Illegal Instruction Error

  • Pins to b20cea67 to fix illegal instruction
  • Verified on openEuler RISC-V

Problem

snappy_benchmark crashes on RISC-V platforms due to:

  • Use of privileged rdcycle instruction in older Google Benchmark versions
  • Linux 6.6+ blocks rdcycle in userspace

Solution

Update benchmark submodule to b20cea67 which:

  • Switches to rdtime instruction (userspace-safe)
  • Maintains backward compatibility
  • Passes all tests on RISC-V

Testing

Environment Result
Hardware SG2042
OS openEuler 25.03
Kernel Version Linux openeuler-riscv64 6.6.0-72.6.0.56.oe2503.riscv64
Benchmark Result All tests passed

@google-cla
Copy link

google-cla bot commented Jul 1, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

- Pins to b20cea67 to fix illegal instruction
- Verified on openEuler RISC-V
@wanghan-sanechips
Copy link
Contributor Author

Hi @haney , this is my first contribution to the project. Could you please approve running the CI workflow? Thank you!

@danilak-G danilak-G merged commit 6f99459 into google:main Jul 29, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants