Git Product home page Git Product logo

libtuv's People

Contributors

akosthekiss avatar bsdelf avatar daeyeon avatar galpeter avatar grgustaf avatar gridnow avatar haesik avatar hs0225 avatar hyunjunekim avatar kolipka avatar laszlolango avatar minjung978 avatar nova0821 avatar qdk0901 avatar robertsipka avatar rtakacs avatar rzr avatar seanshpark avatar topelinux avatar yichoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libtuv's Issues

`fs_file_noent` fail on nuttx

fs_file_noent test fails on nuttx when tuvtester is in second run. it halts and no response.
only running fs_file_noent and commenting others in runner_list.h shows same result.

TTY support

Hello,

I'm developing JavaScript REPL with Jerryscript and libtuv on NuttX platform. However, It seems that TTY functions are not ported in libtuv.

I've tried to include the tty.c source file when building, but it fails to link to symbols: ttyname_r, cfmakeraw, and uv__dup2_cloexec. (ttyname_r and cfmakeraw are not found in any source files in NuttX)

Do you have any plans to support TTY?

Thanks.

Undefined reference error to uv__time_precise() with gcc 5

On an Ubuntu 15.10 (x86_64/Linux) with gcc 5.2.1, I get the following errors when building libtuv with make:

In file included from /home/akiss/devel/libtuv/include/uv.h:54:0,
                 from /home/akiss/devel/libtuv/source/linux/uv_linux_thread.c:40:
/home/akiss/devel/libtuv/source/linux/uv_platform.h:102:17: warning: inline function ‘uv__time_precise’ declared but never defined
 inline uint64_t uv__time_precise();

In file included from /home/akiss/devel/libtuv/include/uv.h:54:0,
                 from /home/akiss/devel/libtuv/test/runner_linux.c:44:
/home/akiss/devel/libtuv/source/linux/uv_platform.h:102:17: warning: inline function ‘uv__time_precise’ declared but never defined
 inline uint64_t uv__time_precise();

Linking C executable ../bin/tuvtester
../lib/libtuv.a(uv_unix_thread.c.o): In function `uv_cond_timedwait':
/home/akiss/devel/libtuv/source/unix/uv_unix_thread.c:311: undefined reference to `uv__time_precise'

(The warnings repeat several times.)

uv_udp_set_ttl not supported for TizenRT

TTL support is almost working for TizenRT but flag IPV6_UNICAST_HOPS is missing:

https://github.com/Samsung/libtuv/blob/master/src/unix/udp.c#L811

This issue prevents successful configuration of TTL in IoT.js for two tests.

test_dgram_setttl_client.js:

https://github.com/Samsung/iotjs/blob/master/test/run_pass/test_dgram_setttl_client.js#L36

test_dgram_setttl_server.js

https://github.com/Samsung/iotjs/blob/master/test/run_pass/test_dgram_setttl_server.js#L45

Problem with send UDP package on TizenRT

I try to use function uv_udp_send from UDP support but I have a problem and always receive -1.

size = sendto(handle->io_watcher.fd, req->bufs->base,

The same function on Raspberry Pi work correct but on TizenRT UDP package isn't sending.

Are you sure that UDP work correct? I don't see any test for UDP in project. Could you add tests or simple example to confirm that UDP works correct?

License is not matched with original source. (/source/uv_inet.c)

It seems "/source/uv_inet.c" is coming from "https://github.com/Samsung/libuv/blob/v1.x/src/inet.c".

However, it has wrong license. It should be below:

/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

loop.handles_queue not clean in in uv_loop_close()

use 239ab0b79c44b983862f9eb55db3c9a5d30d480a
run tuvtester, timer test case will fail at TUV_ASSERT(0 == uv_loop_close(uv_default_loop()));

in uv_loop_close(),

  QUEUE_FOREACH(q, &loop->handles_queue) {
    h = QUEUE_DATA(q, uv_handle_t, handle_queue);
    if (!(h->flags & UV__HANDLE_INTERNAL)) {
      return UV_EBUSY;
    }
  }

will return UV_EBUSY as handles_queue is not empty, but should be emtpy

Implicit/incorrect references to usleep() variants

On an Ubuntu 15.10 (x86_64/Linux) with gcc 5.2.1, I get the following diagnostics when building libtuv with make:

/home/akiss/devel/libtuv/source/unix/tuv_unix_port_system.c: In function ‘uv_sleep’:
/home/akiss/devel/libtuv/source/unix/tuv_unix_port_system.c:22:3: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
   usleep(msec*1000);

/home/akiss/devel/libtuv/test/test_timer.c: In function ‘run_test_timer_run_once’:
/home/akiss/devel/libtuv/test/test_timer.c:345:3: warning: implicit declaration of function ‘uv_usleep’ [-Wimplicit-function-declaration]
   uv_usleep(1000);

/home/akiss/devel/libtuv/test/test_timer.c:345: undefined reference to `uv_usleep'

UDP support is missing

Libtuv currently does not have an implementation for UDP. Looking at the LibUV API's, all functions prefixed with uv_udp_* have not been implemented. I saw that there is some code with commented out case statements containing UDP code paths so it would appear support may be in the works.

Check memory leak in nuttx

tuvtester running in nuttx.

First run

nsh> free
             total       used       free    largest
Mem:        165104      13136     151968      97376

Second run

nsh> free
             total       used       free    largest
Mem:        165104      13472     151632      97376

Assertion in uv__handle_stop

Hello,

I found an assertion failure when trying to stop UV handle by using uv__handle_stop in src/uv-common.h

The running flow is:

  1. Because handle->flags is set to UV_CLOSING at uv_close function in src/unix/core.c.
  2. The statement assert(((h)->flags & UV__HANDLE_CLOSING) == 0); will failed when invoking uv__handle_stop later.

It seems the assertion should not be used here.
Maybe I have some misunderstanding of the code, would you help check it?
Thank you very much.

DNS has only partial support

DNS is missing lookup functionality. There is no implementation for:
int uv_getnameinfo(uv_loop_t* loop, uv_getnameinfo_t* req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr* addr, int flags)

Ever growing poll events table in nuttx.c

Hi,

We have been unable to open/close more than 32 sockets (iot.js on STM32F4).

It seems to be related to the management of poll events in libtuv/src/unix/nuttx.c.
Here is a summary of what we found:

  • uv_add_pollfd should check that loop->npollfds is always less than the fixed size of the array (TUV_POLL_EVENTS_SIZE, which defaults to 32)

  • uv__platform_invalidate_fd should restructure the array (like uv_rem_poll_fd) instead of just marking invalidated fd.

  • uv_rem_pollfd, which would keep the pollfds table from growing, is unfortunately never called (because of the invalidation of the fd done in uv__platform_invalidate_fd).

Hope this helps.

Cedric & Vincent

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.