resolc -O0 never terminates on a reachable empty-body infinite loop

Open
#732 1 comment 1 reaction 1 assignee View on GitHub

Maintainers usually reply within 3 days

@xermicus is already working on this.

Since Nov 13, 2026.

Assessment

This issue has not been assessed yet.

Description

Never returns and writes no artifact; the process keeps one core busy and must be killed.

// SPDX-License-Identifier: UNLICENSE
pragma solidity ^0.8.34;
contract C { constructor() { while (true) {} } }
$ resolc -O1 --bin C.sol -o out1
Compiler run successful. Artifact(s) can be found in directory "out1".

$ resolc -O0 --bin C.sol -o out0
# never returns: ~100% of one core, flat RSS, out0/ stays empty (killed after 120 s)

Expected behavior: resolc -O0 terminates and writes out0/C.sol:C.pvm, as -O1 does.

Git commit: 2942b3a9 (v1.5.0)

Dominant language
Rust
Stars
104
Forks
28
Avg merge
5d 14h
Merged PRs (30d)
24

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from paritytech/revive

All issues in paritytech/revive

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.