#1555·toxcore

Strange behavior tox_pass_encrypt function

Author: kangreonCreated Apr 5, 2016Updated Oct 21, 2018

I encountered a problem when using tox_pass_encrypt functions in your project. I receive an exception "Access violation" in different places. Places of occurrence of this exception changed after changing the code. After experimenting in a debugger I have come to the conclusion that alignment of stack is 16 bytes before calling tox_pass_encrypt solves the problem.

I wrote a test application. It was found that the problem arises after a call tox_new function. Test code I think the same problem was there https://github.com/irungentoo/toxcore/issues/1312

OS: Windows 7 64 bit (toxcore 32 bit) libtoxcore: Make as instructed Compiling

Test application build in MSYS: gcc *.c -I../release/include/ -L./../release/lib/ -llibtox -o test.exe

UPD Problem does not repeat if I turn off UDP. options.udp_enabled = false;