Giter Site home page Giter Site logo

isotoxin / toxcore-vs Goto Github PK

View Code? Open in Web Editor NEW
11.0 7.0 5.0 5.46 MB

All necessary libs to build static toxcore using Visual Studio 2015

C 80.47% C++ 2.60% Assembly 9.56% Shell 0.04% Perl 6 1.41% Makefile 0.90% Objective-C 4.94% Python 0.06% Batchfile 0.02%
tox visual-studio toxcore

toxcore-vs's Introduction

toxcore-vs

All necessary libs to build static toxcore using Visual Studio 2015 (2013 is no longer supported)

Differences from the original toxcore

Current version of toxcore is toktok based, but has some advatages.

Main advantage is PERSISTENT GROUPCHATS compatible with current groupchats.

Tox_Options has addition const char * parameter:
const char * client_capabilities
if client_capabilities is NULL, toxcore-vs works identically to original one. You can provide non-NULL static string with TOX_CLIENT_CAPS_SIZE maximum length, and this string will be sent to another contact whenever the state of the contact becomes online. Other client can read this string with tox_friend_get_client_caps. This is way, that clients can identify clients to enable client-scpecific features.

There are some addition api functions in toxcore-vs:

  • const uint8_t *tox_friend_get_client_caps(const Tox *tox, uint32_t friend_number);
  • void tox_callback_cryptpacket_before_send(Tox *tox, tox_friend_cryptpacket_before_send_cb *callback, void *user_data);
  • bool tox_friend_send_lossless_packet2(Tox *tox, uint32_t friend_number, const uint8_t *data1, size_t length1, const uint8_t *data2, size_t length2);

Build

1. Install Visual Studio 2015 any desktop version (if not yet)
2. run `build_libs_2015.cmd` to build 32 bit libs; run `build_libs_2015.cmd 64` to build 64 bit libs

Another way - create solution and add project (*.vcxproj) files, then build from msvs gui

PS. There are yasm.exe in vpx folder - it necessary to build asm files of vpx lib. If you don't want to run exe from untrusted source, you can download yasm.exe here: http://yasm.tortall.net/Download.html

toxcore-vs's People

Contributors

isotoxin avatar nixman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

toxcore-vs's Issues

Use-after-free if the client doesn't accept fake-invite inside the invite callback

Test case: https://github.com/TokTok/c-toxcore/blob/master/auto_tests/conference_double_invite_test.c.

Note how we don't accept the invite in the callback, resulting in undefined behaviour (use-after-free) on the next tox_iterate call. This is an issue, because:

  1. Some language bindings (e.g. tox4j) defer callback handling by storing the callback data in a queue and processing it afterwards.
  2. The API should generally be robust against misuse. If a standard-conforming program is using the API, it should not cause undefined behaviour inside the implementation.

Memory leak in group code (on termination)

Reproducing test case:

int main(void)
{
    // Create toxes.
    Tox *tox1 = tox_new(0, 0);

    // Create two conferences and then exit.
    tox_conference_new(tox1, 0);
    tox_conference_new(tox1, 0);

    tox_kill(tox1);

    return 0;
}

Leak check trace:

=================================================================
==31974==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 312 byte(s) in 1 object(s) allocated from:
    #0 0x7fe092e90090 in realloc (libasan.so.3+0xc2090)
    #1 0x556c66112b1b in realloc_groupchats ../toxcore/group.c:128
    #2 0x556c66119802 in del_groupchat_internal ../toxcore/group.c:1211
    #3 0x556c661279e3 in kill_groupchats ../toxcore/group.c:3885
    #4 0x556c6617807c in tox_kill ../toxcore/tox.c:208
    #5 0x556c660fcd61 in main conference_two_test.c:27
    #6 0x7fe0925cc2e0 in __libc_start_main (libc.so.6+0x202e0)

SUMMARY: AddressSanitizer: 312 byte(s) leaked in 1 allocation(s).

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.