Git Product home page Git Product logo

Comments (3)

jedisct1 avatar jedisct1 commented on August 23, 2024

Hi,

And sorry for the delayed response.

      (drop (call $fd_write (i32.const 0) (i32.const 16) (i32.const 1) (i32.const 256)))

The descriptor should probably be 1, not 0 here.

That being said, what happens here is that __wasi_fd_read(0...) returns __WASI_EBADF after the first read. This should obviously not be the case.

It only happens when stdin in a TTY. With a file, the descriptor remains valid.

I'm going to investigate why this happens. Thanks for your report!

from lucet.

kanaka avatar kanaka commented on August 23, 2024

@jedisct1 ah yes, I think that must have been a copy/paste from the previous line and I forgot to update the fd value. Thanks for looking into it.

For a little context, I'm trying to get the webassembly implementation of mal/make-a-lisp working across several runtimes. I've gotten it running in wasmtime and in my own runtimes (wac and warpy) but this was one of the issues I ran into trying to get it to run under lucet.

from lucet.

kanaka avatar kanaka commented on August 23, 2024

@jedisct1 I've built lucet with the change and confirmed that it is fixed for my use case. Now on to the next problem I discovered with mal/make-a-lisp: #158 :-)

from lucet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.