Skip to content

syscall: Return E2BIG for oversized exec args and open first - #15007

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl988510855
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl988510855

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

syscall: Return E2BIG for oversized exec args and open first

CopyInVector reports oversized argv/envv as ENAMETOOLONG or ENOMEM. Linux copy_strings returns E2BIG.

This showed up in datalad's test_too_long: a valid python path plus CMD_MAX_ARG arguments produced "File name too long" instead of "argument list too long":
https://github.com/datalad/datalad/blob/256c5946ac3c920748ed7de6366b90be26cdedad/datalad/runner/tests/test_witless_runner.py#L338

Linux also opens the file first (fs/exec.c:alloc_bprm), so pathname errors beat E2BIG. Open in execveat before copying argv/envv.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14853 from tanyifeng:fix-execve-e2big bd27899

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Sep 25, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl988510855 branch 5 times, most recently from ca91fbe to 6fa705d Compare October 1, 2026 04:08
CopyInVector reports oversized argv/envv as ENAMETOOLONG or ENOMEM. Linux copy_strings returns E2BIG.

This showed up in datalad's test_too_long: a valid python path plus CMD_MAX_ARG arguments produced "File name too long" instead of "argument list too long":
https://github.com/datalad/datalad/blob/256c5946ac3c920748ed7de6366b90be26cdedad/datalad/runner/tests/test_witless_runner.py#L338

Linux also opens the file first (fs/exec.c:alloc_bprm), so pathname errors beat E2BIG. Open in execveat before copying argv/envv.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#14853 from tanyifeng:fix-execve-e2big bd27899
PiperOrigin-RevId: 988510855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant