Coder Social home page Coder Social logo

top on Fedora error about appscope HOT 1 CLOSED

iapaddler avatar iapaddler commented on July 2, 2024
top on Fedora error

from appscope.

Comments (1)

michalbiesek avatar michalbiesek commented on July 2, 2024

The #1572 address the issue.

The root cause:

The problematic code resides in _nc_read_entry2 in curses library.

char filename[PATH_MAX]
...

    _nc_SPRINTF(filename, _nc_SLIMIT(PATH_MAX)
		"%.*s", PATH_MAX - 1, name);

The variable name above is set to "xterm".

In the absence of libscope.so, the aforementioned function assigns
the value "xterm" to the filename variable. However, when libscope.so
is loaded, the function assigns "xter" to filename.

In the Fedora environment, the invocation of __sprintf_chk
leads to the execution of __vsprintf_internal:

   va_start (ap, format);
   ret = __vsprintf_internal(s, slen, format, ap, mode);
   va_end (ap);

On the other hand, AppScope utilizes the following call:

   va_start(ap, format);
   rc = vsnprintf(str, strlen, format, ap);
   va_end(ap);

It should be noted that the implementations of vsnprintf and
__vsprintf_internal differ in standard library. This commit replaces
the vsnprintf call with vsprintf to address the discrepancy.

The easiest way to test it is to try to scope top on Fedora.
Integration test was added to cover the issue.

from appscope.

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.