Skip to content

feat(linux): set unlimited stack size for SPEC runtime scripts - #58

Merged
rezado merged 2 commits into
OpenXiangShan:mainfrom
XSCCTeam:fix/ulimit-unlimited
Sep 3, 2026
Merged

feat(linux): set unlimited stack size for SPEC runtime scripts#58
rezado merged 2 commits into
OpenXiangShan:mainfrom
XSCCTeam:fix/ulimit-unlimited

Conversation

@MrLinWang

@MrLinWang MrLinWang commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
  • Add ulimit -s unlimited 2>/dev/null || true to the run.sh generated by the three packaging scripts for spec2006 / spec2017 / spec2026, setting the stack limit to unlimited at script startup to reduce the risk of run failures caused by the default stack limit.
  • +1 line per package script (in write_runtime_files / generate_runtime_script).
  • The 2>/dev/null || true ensures the script continues executing even if the ulimit adjustment fails or the environment is
    restricted, so it is not affected by set -e.

@rezado

rezado commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

I found one minor issue in the SPEC2017 packaging script: write_runtime_files() already emits
ulimit -s unlimited 2>/dev/null || true
at line 930, so the new line at line 925 causes the generated run.sh to execute the same command twice.

@MrLinWang

Copy link
Copy Markdown
Contributor Author

I found one minor issue in the SPEC2017 packaging script: write_runtime_files() already emits ulimit -s unlimited 2>/dev/null || true at line 930, so the new line at line 925 causes the generated run.sh to execute the same command twice.

Good catch — it was indeed a duplicate. I removed the newly added line (previously at line 925) from write_runtime_files() and kept the existing ulimit -s unlimited 2>/dev/null || true, so the generated run.sh now executes it only once. Updated commit has been pushed.

@rezado
rezado merged commit 3d307c8 into OpenXiangShan:main Sep 3, 2026
2 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