Skip to content

Commit b4e6de8

Browse files
committed
getenv failed
1 parent e7c7647 commit b4e6de8

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -420,19 +420,21 @@ pub export fn close(_: c_int) c_int {
420420
[...many many more...]
421421
```
422422

423+
And we [fixed the malloc](https://github.com/lupyuen/tcc-riscv32-wasm/commit/e7c76474deb52acadd3540dec0589ab98ae243a9#diff-5ecd8d41f5376644e9c3f17c9eac540841ff6f7c00bca34d7811b54e0b9bd7a0)
424+
423425
When we run it...
424426

425427
```text
426428
+ node zig/test.js
427-
wasm://wasm/00610af2:1
429+
compile_program
430+
wasm://wasm/00629742:1
428431
RuntimeError: unreachable
429-
at builtin.default_panic (wasm://wasm/00610af2:wasm-function[272]:0x4e9dc)
430-
at malloc (wasm://wasm/00610af2:wasm-function[294]:0x4f08d)
431-
at tcc_new (wasm://wasm/00610af2:wasm-function[110]:0x226cf)
432-
at main (wasm://wasm/00610af2:wasm-function[136]:0x2862c)
433-
at compile_program (wasm://wasm/00610af2:wasm-function[267]:0x4e333)
434-
at /workspaces/bookworm/tcc-riscv32-wasm/zig/test.js:10:15
432+
at builtin.default_panic (wasm://wasm/00629742:wasm-function[275]:0x4ed97)
433+
at getenv (wasm://wasm/00629742:wasm-function[303]:0x50371)
434+
at set_environment (wasm://wasm/00629742:wasm-function[136]:0x29c74)
435+
at main (wasm://wasm/00629742:wasm-function[135]:0x29480)
436+
at compile_program (wasm://wasm/00629742:wasm-function[266]:0x4e3f6)
437+
at /workspaces/bookworm/tcc-riscv32-wasm/zig/test.js:52:15
435438
```
436439

437-
TODO: Fix the malloc
438-
440+
TODO: Implement getenv()

0 commit comments

Comments
 (0)