Ad
  • Custom User Avatar

    True, did not noticed that, thank you, it worked.

  • Custom User Avatar

    I wrote my solution in C, but the test program is crashing, the problem is in the libcriterion.so, there is some way to attach the gdb on it and see what is going on?
    Just in case, i wrote this simple function to verify my code locally and all sample tests are working!

    void fixed_test(size_t n, enum Event events[], enum State waited_result){
    	if(get_TCP_state(n, events) == waited_result){
    		puts("[+] g00d [+]");
    	} else {
    		puts("[-] b4d [-]");
    	}
    }
    

    This is the error, as i can't attach any debbuger i can't see what is in those addresses:

    /usr/lib/libcriterion.so.3(+0x32b87)[0x7f3d3b842b87]
    /usr/lib/libcriterion.so.3(+0x34e0a)[0x7f3d3b844e0a]
    /usr/lib/libcriterion.so.3(+0x1a34b)[0x7f3d3b82a34b]
    /usr/lib/libcriterion.so.3(+0x270fd)[0x7f3d3b8370fd]
    /usr/lib/libcriterion.so.3(+0x21cc4)[0x7f3d3b831cc4]
    /usr/lib/libcriterion.so.3(+0x193f3)[0x7f3d3b8293f3]
    /usr/lib/libcriterion.so.3(+0x176ef)[0x7f3d3b8276ef]
    /usr/lib/libcriterion.so.3(+0x11e96)[0x7f3d3b821e96]
    /usr/lib/libcriterion.so.3(criterion_run_all_tests+0x1d2)[0x7f3d3b8183b2]
    /usr/lib/libcriterion.so.3(main+0x30)[0x7f3d3b8170f0]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f3d3af18c87]
    ./test[0x400b2a]
    Invalid argument [22] (/src/criterion/build/nanomsg-build/src/nanomsg/src/aio/usock_posix.inc:353)