Skip to content

Ensure argv is null terminated.#72

Merged
sunfishcode merged 1 commit intomasterfrom
argv_null_terminate
May 30, 2019
Merged

Ensure argv is null terminated.#72
sunfishcode merged 1 commit intomasterfrom
argv_null_terminate

Conversation

@sbc100
Copy link
Member

@sbc100 sbc100 commented May 29, 2019

This matches the behavior of populate __environ.

See WebAssembly/WASI#27

This matches the behavior of populate __environ.

See #27
@sbc100 sbc100 requested a review from sunfishcode May 29, 2019 23:30
@sunfishcode
Copy link
Member

Makes sense.

The alternative here is to say that it's always the WASI implementation's job to add the NULL terminator, however doing it in crt1.c here is simpler for non-C-family languages that don't require the NULL terminator, so let's go with that.

@sunfishcode sunfishcode merged commit 92eaf25 into master May 30, 2019
@sunfishcode sunfishcode deleted the argv_null_terminate branch May 30, 2019 15:15
sunfishcode added a commit to bytecodealliance/wasmtime that referenced this pull request May 30, 2019
The wasm userspace has been updated to do that instead, in
WebAssembly/wasi-libc#72.
kubkon pushed a commit to bytecodealliance/wasmtime that referenced this pull request Jun 2, 2019
The wasm userspace has been updated to do that instead, in
WebAssembly/wasi-libc#72.
tschneidereit pushed a commit to tschneidereit/wasmtime that referenced this pull request Jun 25, 2019
The wasm userspace has been updated to do that instead, in
WebAssembly/wasi-libc#72.
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