Giter VIP home page Giter VIP logo

Comments (9)

jarun avatar jarun commented on July 20, 2024

I am unable to reproduce on Ubuntu. Can you please debug further to figure out which pointer is being freed without allocation?

from nnn.

jarun avatar jarun commented on July 20, 2024

This is coming from commit 3665541 and the next one.

@N-R-K can you please have a look?

from nnn.

jarun avatar jarun commented on July 20, 2024

Can we write directly to fd instead of having the temporary buffer?

from nnn.

jarun avatar jarun commented on July 20, 2024

Please confirm that the fix works.

from nnn.

N-R-K avatar N-R-K commented on July 20, 2024

This looks like a duplicate of #1768

It should be fixed in master. @XhstormR Can you try master branch and confirm?

This is coming from commit 3665541 and the next one.

@jarun I'm pretty sure that that is the commit that fixed the issue. be6988d should not be necessary.

from nnn.

N-R-K avatar N-R-K commented on July 20, 2024

Can we write directly to fd instead of having the temporary buffer?

Making a syscall for each and every byte seems unnecessary waste of resources to me.

IMO be6988d should be reverted since the bug was already fixed.

OP was using v4.9 instead of master branch. Maybe we can cut a new release soon?

from nnn.

jarun avatar jarun commented on July 20, 2024

I reproduced this one master (using fastmac) before attempting the fix.

As for a syscall overhead, I will add a new version to use dprintf.

from nnn.

N-R-K avatar N-R-K commented on July 20, 2024

I reproduced this one master (using fastmac) before attempting the fix.

Interesting. I don't know how that's possible. The help string is 1832 bytes and the buffer is 2048 bytes. It has more than enough space.

As for a syscall overhead, I will add a new version to use dprintf.

dprintf also makes 1 write syscall per call since dprintf uses file-descriptor directly without any buffering.

You'd need to use a FILE * with fopen + fwrite etc to avoid many syscalls. Do you want to make that change yourself or should I open a PR later today?

from nnn.

jarun avatar jarun commented on July 20, 2024

Please raise the PR.

from nnn.

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.